Created
January 24, 2022 19:14
-
-
Save SahanAmarsha/908d3c2ac8d5039034fbaad06f2f52e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [name, setName] = useState(""); | |
const [price, setPrice] = useState(""); | |
const [description, setDescription] = useState(""); | |
const [imageUrl, setImageUrl] = useState(""); | |
const addCarOverrides = { | |
"Flex.Flex[0].Flex[1].TextField[0]": { | |
onChange: (event) => { | |
setName(event.target.value); | |
}, | |
}, | |
"Flex.Flex[0].Flex[1].TextField[1]": { | |
onChange: (event) => { | |
setPrice(event.target.value); | |
}, | |
}, | |
"Flex.Flex[0].Flex[1].TextField[2]": { | |
onChange: (event) => { | |
setDescription(event.target.value); | |
}, | |
}, | |
"Flex.Flex[0].Flex[1].TextField[3]": { | |
onChange: (event) => { | |
setImageUrl(event.target.value); | |
}, | |
}, | |
"Flex.Flex[0].Flex[2].Button[0]": { | |
onClick: () => { | |
// save data | |
}, | |
}, | |
}; | |
return ( | |
... | |
<AddCar overrides={addCarOverrides} style={{ textAlign: "left", margin: "1rem" }} /> | |
... | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment