Notice
Recent Posts
Recent Comments
Link
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

ksw_devlog

TIL 10주 5일차-React Native Project 본문

TIL

TIL 10주 5일차-React Native Project

kimcoach 2023. 1. 6. 23:00

모든 리뷰가 들어있는 페이지 UI만들기

 

import { Text, View, FlatList } from 'react-native';
import styled from '@emotion/native';
import ReviewsCard from '../components/ReviewsCard';

export default function Reviews() {
 
  return (
    <>
    <ReviewsCard />
    </>
  );
}

-------
import React from "react";
import styled from '@emotion/native';


export default function ReviewsCard() {

    return (
        <Container>
      <RWrapper>
        <Poster source={{uri: url}} />
        <RColumn>
          <Rating>⭐️8.5/10</Rating>
          <RTitle>
            영웅
          </RTitle>
        </RColumn>
      </RWrapper>
    </Container>
    )
}

const Container = styled.ScrollView`
  flex-wrap: wrap;
`
const RWrapper = styled.TouchableOpacity`
  background-color: white;
  border-radius: 5px;
  margin: 10px;
`

const Poster = styled.Image`
  width: 120px;
  height: 170px;
  background-color: grey;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
`
const RColumn = styled.View`
  padding: 10px;
`;
const Rating = styled.Text`
  color: black;
  margin-top: 5px;
  margin-bottom: 5px;
`;
const RTitle = styled.Text`
  font-size: 13px;
  font-weight: 600;
  color: black;
`;

 

 

 

 

 

'TIL' 카테고리의 다른 글

TIL 11주 1일차-react native project  (0) 2023.01.09
WIL 10주차  (0) 2023.01.08
TIL 10주 4일차  (0) 2023.01.05
TIL 10주 3일차  (0) 2023.01.04
TIL 10주 2일차  (0) 2023.01.04