feat: extract component
This commit is contained in:
parent
a536971049
commit
14dce09e8a
1 changed files with 15 additions and 2 deletions
|
@ -1,12 +1,25 @@
|
|||
import { Center, Container, Input, Text, VStack } from "@chakra-ui/react";
|
||||
|
||||
interface QuestionBoxProps {
|
||||
question: string;
|
||||
}
|
||||
|
||||
const QuestionBox = (props: QuestionBoxProps) => {
|
||||
const { question } = props;
|
||||
return (
|
||||
<>
|
||||
<Text>{question}</Text>
|
||||
<Input placeholder="Subtle" variant="subtle" />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<Container h="100vh" w="100vw">
|
||||
<Center h="100%">
|
||||
<VStack>
|
||||
<Text>Quanto è lunga una patatina chips?</Text>
|
||||
<Input placeholder="Subtle" variant="subtle" />
|
||||
<QuestionBox question="Quanto è lunga una patatina chips?" />
|
||||
</VStack>
|
||||
</Center>
|
||||
</Container>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue