diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 0177758501ff..e06b6c8f528e 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -4555,6 +4555,9 @@ Map { "className": Object { "type": "string", }, + "disabled": Object { + "type": "bool", + }, "index": Object { "type": "number", }, diff --git a/packages/react/src/components/Switch/Switch.js b/packages/react/src/components/Switch/Switch.js index fb2b1f92b343..1326e03a2a5d 100644 --- a/packages/react/src/components/Switch/Switch.js +++ b/packages/react/src/components/Switch/Switch.js @@ -15,6 +15,7 @@ const { prefix } = settings; const Switch = React.forwardRef(function Switch(props, tabRef) { const { className, + disabled, index, name, onClick, @@ -43,6 +44,7 @@ const Switch = React.forwardRef(function Switch(props, tabRef) { onClick: handleClick, onKeyDown: handleKeyDown, className: classes, + disabled, }; return ( @@ -66,6 +68,11 @@ Switch.propTypes = { */ className: PropTypes.string, + /** + * Specify whether or not the Switch should be disabled + */ + disabled: PropTypes.bool, + /** * The index of your Switch in your ContentSwitcher that is used for event handlers. * Reserved for usage in ContentSwitcher