Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
646 B
2
Indexable
 const [nameValue, setName] = useState("")
  const [descValue, setDesc] = useState("")

  const handleFormSand = () => {
    console.log(nameValue, descValue)
    // submit form
  }
  
  return (
    <Box as="form" onSubmit={(e) => {
      e.preventDefault()
      handleFormSand()
    }}>
      <Input   placeholder="L'art de ..." mb={3} value={nameValue} onChange={(e)=> {
        setName(e.target.value)
      }} />
      <Textarea name="gDesc" id="gDesc" rows={6} mb={3} value={descValue} placeholder="Bla bla bla bla bla ..." onChange={(e)=> {
        setDesc(e.target.value)
      }} />
      <Button>Enregistrer</Button>
    </Box>
  );
}
Leave a Comment