Doist / reactist

Open source React components made with ❤️ by Doist
http://doist.github.io/reactist
MIT License
249 stars 22 forks source link

feat: Enhance the `label` property in `CheckboxField` to be of the type `React.ReactNode` #697

Closed rfgamaral closed 2 years ago

rfgamaral commented 2 years ago

Short description

This change enhances the label property in the CheckboxField component to be of the type React.ReactNode, allowing one to use a React component as label, instead of only a string.

This will permit that the checkbox, icon, and text label, in the items such as the ones below, are all clickable (thus toggling the check state on and off):

image

PR Checklist

Versioning

Minor: v15.1.0

rfgamaral commented 2 years ago

cc @gnapse, this follows-up our conversation over DM on Twist