mirror of
https://github.com/zhigang1992/examples.git
synced 2026-01-12 22:47:03 +08:00
26 lines
576 B
JavaScript
26 lines
576 B
JavaScript
import React from "react";
|
|
import styled from "styled-components/native";
|
|
import { View, Text } from "react-native";
|
|
|
|
export default function App() {
|
|
return (
|
|
<Container>
|
|
<Title color="palevioletred">Expo with 💅 Styled Components</Title>
|
|
<Title color="chocolate">iOS • Android • web</Title>
|
|
</Container>
|
|
);
|
|
}
|
|
|
|
const Container = styled(View)`
|
|
flex: 1;
|
|
background-color: papayawhip;
|
|
justify-content: center;
|
|
align-items: center;
|
|
`;
|
|
|
|
const Title = styled(Text)`
|
|
font-size: 24px;
|
|
font-weight: 500;
|
|
color: ${(props) => props.color};
|
|
`;
|