diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 43e3c1b3776b..77fe6455a58c 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -6450,6 +6450,9 @@ Map { "onClick": Object { "type": "func", }, + "required": Object { + "type": "bool", + }, "slug": Object { "type": "node", }, @@ -6534,6 +6537,9 @@ Map { "readOnly": Object { "type": "bool", }, + "required": Object { + "type": "bool", + }, "slug": Object { "type": "node", }, diff --git a/packages/react/src/components/RadioButton/RadioButton.tsx b/packages/react/src/components/RadioButton/RadioButton.tsx index 36367070d49b..a8edb56c1988 100644 --- a/packages/react/src/components/RadioButton/RadioButton.tsx +++ b/packages/react/src/components/RadioButton/RadioButton.tsx @@ -91,6 +91,11 @@ export interface RadioButtonProps * Specify the value of the `` */ value?: string | number; + + /** + * `true` to specify if the input is required. + */ + required?: boolean; } const RadioButton = React.forwardRef((props: RadioButtonProps, ref) => { @@ -105,6 +110,7 @@ const RadioButton = React.forwardRef((props: RadioButtonProps, ref) => { onChange = () => {}, value = '', slug, + required, ...rest } = props; @@ -152,6 +158,7 @@ const RadioButton = React.forwardRef((props: RadioButtonProps, ref) => { disabled={disabled} value={value} name={name} + required={required} />