Skip to content

Commit

Permalink
fix: widen RadioField value prop type to string | boolean (#2856)
Browse files Browse the repository at this point in the history
Co-authored-by: Douglas Egiemeh <[email protected]>
  • Loading branch information
ragafus and ddouglasz authored Jul 16, 2024
1 parent 2e60131 commit 2a18fe8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-avocados-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-uikit/radio-field': patch
---

Widen `RadioField` value prop type to `string | boolean`
2 changes: 1 addition & 1 deletion packages/components/fields/radio-field/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default Example;
| `isRequired` | `boolean` | | | Indicates if the value is required. Shows an the "required asterisk" if so. |
| `touched` | `boolean` | | | Indicates whether the field was touched. Errors will only be shown when the field was touched. |
| `name` | `string` | | | Used as HTML name of the input component. |
| `value` | `string` || | Value of the input component. |
| `value` | `string` or `boolean` || | Value of the input component. |
| `onChange` | `ChangeEventHandler` | | | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value. |
| `onBlur` | `FocusEventHandler` | | | Called when input is blurred |
| `onFocus` | `FocusEventHandler` | | | Called when input is focused |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/fields/radio-field/src/radio-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export type TRadioFieldProps = {
/**
* Value of the input component.
*/
value: string;
value: string | boolean;
/**
* Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value.
*/
Expand Down

0 comments on commit 2a18fe8

Please sign in to comment.