Skip to content

Commit

Permalink
chore(FormLabel): replace label_direction with vertical & `labelD…
Browse files Browse the repository at this point in the history
…irection` (#4241)
  • Loading branch information
langz authored Nov 7, 2024
1 parent d4e4334 commit 55c7ad3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Default = () => (

export const Vertical = () => (
<ComponentBox data-visual-test="form-label-vertical">
<FormLabel for_id="alone-2" label_direction="vertical">
<FormLabel for_id="alone-2" vertical>
Vertical FormLabel
</FormLabel>
<Checkbox id="alone-2" label="Checkbox" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ class AutocompleteInstance extends React.PureComponent {
id={id + '-label'}
for_id={id}
text={label}
label_direction={label_direction}
labelDirection={label_direction}
sr_only={label_sr_only}
disabled={disabled}
skeleton={skeleton}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const CheckboxSandbox = () => (
</CustomRow>
</Box>
<Box>
<FormLabel forId="checkbox-1" label_direction="vertical" vertical>
<FormLabel forId="checkbox-1" vertical>
Vertical FormLabel for a Checkbox component:
</FormLabel>
<Checkbox id="checkbox-1" label="Unchecked disabled" disabled />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export default class DatePicker extends React.PureComponent {
id={id + '-label'}
for_id={id}
text={label}
label_direction={label_direction}
labelDirection={label_direction}
sr_only={label_sr_only}
disabled={disabled}
skeleton={skeleton}
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ class DropdownInstance extends React.PureComponent {
id={id + '-label'}
for_id={id}
text={label}
label_direction={label_direction}
labelDirection={label_direction}
sr_only={label_sr_only}
disabled={disabled}
skeleton={skeleton}
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/form-row/FormRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default class FormRow extends React.PureComponent {
for_id={useFieldset ? null : id} // we don't use for_id, because we don't have a single element to target to
text={label}
element={useFieldset ? 'legend' : 'label'}
label_direction={label_direction}
labelDirection={label_direction}
sr_only={label_sr_only}
disabled={disabled}
skeleton={skeleton}
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/textarea/Textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ export default class Textarea extends React.PureComponent {
id={id + '-label'}
for_id={id}
text={label}
label_direction={label_direction}
labelDirection={label_direction}
sr_only={label_sr_only}
disabled={disabled}
skeleton={skeleton}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export default class ToggleButton extends React.PureComponent {
text={label}
disabled={disabled}
skeleton={skeleton}
label_direction={label_direction}
labelDirection={label_direction}
sr_only={label_sr_only}
/>
)}
Expand Down

0 comments on commit 55c7ad3

Please sign in to comment.