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";
|
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() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<Container h="100vh" w="100vw">
|
<Container h="100vh" w="100vw">
|
||||||
<Center h="100%">
|
<Center h="100%">
|
||||||
<VStack>
|
<VStack>
|
||||||
<Text>Quanto è lunga una patatina chips?</Text>
|
<QuestionBox question="Quanto è lunga una patatina chips?" />
|
||||||
<Input placeholder="Subtle" variant="subtle" />
|
|
||||||
</VStack>
|
</VStack>
|
||||||
</Center>
|
</Center>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue