marilari88 / zod-playground

Play with Zod schema validation
https://zod-playground.vercel.app
MIT License
31 stars 1 forks source link

feat: add clear button #24

Closed giacomocerquone closed 4 months ago

giacomocerquone commented 4 months ago

This PR adds a button to clear the value in the ValueEditor component.

closes #16

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zod-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 9:18pm
marilari88 commented 4 months ago

Actually I meant to add a clear button for the schema. Anyway I think the clear button for values can be a good addiction

marilari88 commented 4 months ago

I am not really convinced about the icon. The trash makes me think about remove the entire value item (not just clear the text) I checked the icon set and I didn't found anything better (maybe the FiX can be an alternative) Considering you added also the tooltip we can go live with the trash and pondering switching to a more complete icon set at later time

giacomocerquone commented 4 months ago

Actually I meant to add a clear button for the schema. Anyway I think the clear button for values can be a good addiction

Yeah I guess a clear button makes sense in both the editors

giacomocerquone commented 4 months ago

I am not really convinced about the icon. The trash makes me think about remove the entire value item (not just clear the text) I checked the icon set and I didn't found anything better (maybe the FiX can be an alternative) Considering you added also the tooltip we can go live with the trash and pondering switching to a more complete icon set at later time

You can also consider to add a condensed text button instead of an icon with the label "clear" without adding the tooltip