vtex / shoreline

Design System for the VTEX Admin that replaces "Admin UI" and "Styleguide"
https://shoreline.vtex.com
15 stars 0 forks source link

Add help text at Radio item #1706

Open luarakerlen opened 2 weeks ago

luarakerlen commented 2 weeks ago

Summary

I need to design a forms where radio items has a help text. My suggestion is to add this as optional prop, because I believe this can be useful for other applications.

image

Rationale

No response

lucasaarcoverde commented 2 weeks ago

You already can do this behavior using Field components, something like that:

<Field>
  <Radio value="daily">Daily</Radio>
  <FieldDescription>1 Row per day per entity</FieldDescription>
</Field>

But the design is a little bit different from the one you just sent here. @beatrizmilhomem @davicostalf can you take a look on this?

Screenshot 2024-07-09 at 13 11 25

you can check on this sandbox for implementation details

davicostalf commented 1 week ago

Lua had asked me before and I had forgotten about the Field component. That answers it, I believe.

Regarding the layout, the label in this case was omitted because there's a form section dedicated for this field. This makes sense sometimes.