Closed franzheidl closed 1 year ago
Hi @franzheidl !! if you don't want someone merge a PR I would recommend setting the PR to draft
. Look under the reviewers you will see a link with Convert to draft
. Then is not anymore for other users to merge until you switch back the PR :)
Hey @ArtieReus, tu ets un sabelotodo! š¤ Done just as you recommended. Wasn't quite sure whether Draft-PRs can be viewed by other users but they can, so works fine for me, thanks. šš
This PR introduces
label
andrequired
props toTextInput
,Textarea
,Select
,Checkbox
andRadio
. It removes thevariant
-prop fromTextInputRow
,TextareaRow
, andSelectRow
, as these will only support floating labels from now on.TextInput
,Textarea
,Select
,Checkbox
, andRadio
can now render their own label (and mark as required if passed) WITHOUT the need to useTextInputRow
,TextareaRow
,SelectRow
,CheckboxRow
, orRadioRow
respectively.For now, the respective
ā¦-Row
components will continue to work, but the mid-term aim is to remove them. They will now pass thelabel
andrequired
prop directly to the actual input component.Also, this PR introduces a generic
FormRow
component to take care of form element spacing.The minimising logic of floating labels has been moved to the
Label
component. It now accepts afloating
prop to set it up (position it absolute), and aminimised
prop if it is to be minimised. All form input elements that can render labels will now use thisLabel
component internally.TODO:
name
and pass methods to handle parent and child state, so we don't have to clone children in:name
attribute for both RadioGroup and CheckboxGroupTextInput
Textarea
Switch
Select
.