proksh / atomize

Design System for developers build on styled-components & React JS.
https://atomizecode.com/
Other
1.74k stars 340 forks source link

Input and textarea available prop for existing copy #49

Closed drewbrophy closed 3 years ago

drewbrophy commented 3 years ago

I was trying to place text (not placeholder text) in the input and textarea by default. I did not see any prop to do this but mirroring standard HTML I tried using:

<Input placeholder="Headline" value="What Fields Do You Care About?" />

This allowed for the value to appear, but not it appears to be frozen (the value can not be changed). Is there a way to place an initial value but then for the user to be able to change it?

Thank you in advance! Atomize has been game changing so I'm grateful for all of your work on it.

LucaMoro96 commented 3 years ago

Maybe try setting the state that controls the input and use that value in the value field of <Input />

const [text, setText] = useState("default text value")

drewbrophy commented 3 years ago

Thank you so much.