react-spectrum
a02fe15f - Conditionally render field label only if label is provided (#6833)

Comment changes are shownComment changes are hidden
Commit
308 days ago
Conditionally render field label only if label is provided (#6833) * do not render field label if no children (string) provided * add label-less story for testing * add more examples to form story * add story with form with labeled and non-labeled components * hide value label when label is hidden for meter and progress bar Will need warning in eventual docs that this is not accessible unless the value is displayed visually externally * Improve labeling in example --------- Co-authored-by: Devon Govett <devongovett@gmail.com>
Author
Parents
  • packages/@react-spectrum/s2
    • src
      • File
        Field.tsx
      • File
        Meter.tsx
      • File
        ProgressBar.tsx
    • stories
      • File
        Form.stories.tsx