yankaindustries / mc-components

Components library and core styles for Masterclass
https://yankaindustries.github.io/mc-components
11 stars 3 forks source link

adding FormGroup to CheckboxField so that it may show an error state #775

Closed jstnjns closed 3 years ago

jstnjns commented 3 years ago

Overview

CheckboxFields don't inherently display their errors like InputField and SelectFields do. This means that any case where something like a CheckboxField is required and should be displaying an error has to be handled manually. By wrapping it in a FormGroup with no label, we're able to get any wrapping context (error, warning, help, etc) that should come with the input.

Risks

Low - existing checkboxes with errors might display them now if they didn't before

Changes

image

Breaking change?

Backwards Compatible