Skip to content

Commit

Permalink
Ad _formElement to form components
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Nov 15, 2023
1 parent 5a62449 commit b2ea0c0
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2095,5 +2095,5 @@ class AutocompleteInstance extends React.PureComponent {
}

Autocomplete.HorizontalItem = DrawerList.HorizontalItem

Autocomplete._formElement = true
Autocomplete._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,5 @@ Content.defaultProps = {
isIconOnly: null,
}

Button._formElement = true
Button._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,5 @@ CheckIcon.defaultProps = {
size: 'default',
}

CheckIcon._formElement = true
CheckIcon._supportsSpacingProps = true
Original file line number Diff line number Diff line change
Expand Up @@ -740,4 +740,5 @@ export default class DatePicker extends React.PureComponent {
}
}

DatePicker._formElement = true
DatePicker._supportsSpacingProps = true
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 @@ -698,5 +698,5 @@ class DropdownInstance extends React.PureComponent {
}

Dropdown.HorizontalItem = DrawerList.HorizontalItem

Dropdown._formElement = true
Dropdown._supportsSpacingProps = true
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,5 @@ export default function FormLabel(localProps: FormLabelAllProps) {
return <Element {...params}>{text || children}</Element>
}

FormLabel._formElement = true
FormLabel._supportsSpacingProps = true
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ InputMasked.defaultProps = {
on_submit_blur: null,
}

InputMasked._formElement = true
InputMasked._supportsSpacingProps = true

export default InputMasked
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,6 @@ function MultiInputMaskInput<T extends string>({
}

export default MultiInputMask

MultiInputMask._formElement = true
MultiInputMask._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,4 +777,5 @@ InputIcon.propTypes = {
]).isRequired,
}

Input._formElement = true
Input._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/input/InputPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,5 @@ export default class InputPassword extends React.PureComponent {
}
}

InputPassword._formElement = true
InputPassword._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/radio/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,4 +461,5 @@ export default class Radio extends React.PureComponent {
}
}

Radio._formElement = true
Radio._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/radio/RadioGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,5 @@ export default class RadioGroup extends React.PureComponent {
}
}

RadioGroup._formElement = true
RadioGroup._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function Slider(localProps: SliderAllProps) {
)
}

Slider._formElement = true
Slider._supportsSpacingProps = true

export default Slider
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/switch/Switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,4 +363,5 @@ export default class Switch extends React.PureComponent {
}
}

Switch._formElement = true
Switch._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ const Tag = (localProps: TagProps & SpacingProps) => {

Tag.Group = TagGroup

Tag._formElement = true
Tag._supportsSpacingProps = true

export default Tag
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/textarea/Textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,4 +543,5 @@ export default class Textarea extends React.PureComponent {
}
}

Textarea._formElement = true
Textarea._supportsSpacingProps = true
Original file line number Diff line number Diff line change
Expand Up @@ -501,4 +501,5 @@ export default class ToggleButton extends React.PureComponent {
}
}

ToggleButton._formElement = true
ToggleButton._supportsSpacingProps = true
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,5 @@ export default class ToggleButtonGroup extends React.PureComponent {
}
}

ToggleButtonGroup._formElement = true
ToggleButtonGroup._supportsSpacingProps = true
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/components/upload/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const Upload = (localProps: UploadAllProps) => {

Upload.useUpload = useUpload

Upload._formElement = true
Upload._supportsSpacingProps = true

export default Upload

0 comments on commit b2ea0c0

Please sign in to comment.