Reputation: 39
How can i achieve a behaviour like this on the ios tasks app.
where you can select one color, and it stays selected, showing that with a grey border.
Thank you for your answers! Im a noob,
Upvotes: 0
Views: 228
Reputation: 219
you can do component to btn with state. const [isClicked,setIsClicked] = useState();
<Button onPress ={()=>setIsClicked(!isClicked)} style={{borderWidth:isClicked?1:0, borderColor:'grey' }}/>
something like that
Upvotes: 1