From 8540893bd2c05e50dee7ce5742f318cf25646ca2 Mon Sep 17 00:00:00 2001 From: Josefina Mancilla Date: Fri, 3 Dec 2021 16:03:53 -0600 Subject: [PATCH 1/2] fix: radio-btn disabled styles --- .../src/components/RadioButton/RadioButton.stories.js | 2 +- .../styles/scss/components/radio-button/_radio-button.scss | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/carbon-react/src/components/RadioButton/RadioButton.stories.js b/packages/carbon-react/src/components/RadioButton/RadioButton.stories.js index 1285ec0fe2de..8a24f36ec987 100644 --- a/packages/carbon-react/src/components/RadioButton/RadioButton.stories.js +++ b/packages/carbon-react/src/components/RadioButton/RadioButton.stories.js @@ -16,7 +16,7 @@ export const Default = () => { legendText="Radio button heading" name="radio-button-group" defaultSelected="radio-1"> - + diff --git a/packages/styles/scss/components/radio-button/_radio-button.scss b/packages/styles/scss/components/radio-button/_radio-button.scss index 45c70f06e9fb..b57c663f7346 100644 --- a/packages/styles/scss/components/radio-button/_radio-button.scss +++ b/packages/styles/scss/components/radio-button/_radio-button.scss @@ -121,15 +121,15 @@ $radio-border-width: 1px !default; } } - .#{$prefix}--radio-button:button-disabled + .#{$prefix}--radio-button__label { + .#{$prefix}--radio-button:disabled + .#{$prefix}--radio-button__label { color: $button-disabled; cursor: not-allowed; } - .#{$prefix}--radio-button:button-disabled + .#{$prefix}--radio-button:disabled + .#{$prefix}--radio-button__label .#{$prefix}--radio-button__appearance, - .#{$prefix}--radio-button:button-disabled:checked + .#{$prefix}--radio-button:disabled:checked + .#{$prefix}--radio-button__label .#{$prefix}--radio-button__appearance { border-color: $border-disabled; From ded309240829f630bae61608bfd01527d0ec0fdd Mon Sep 17 00:00:00 2001 From: Josefina Mancilla Date: Mon, 6 Dec 2021 14:31:28 -0600 Subject: [PATCH 2/2] fix: explicitly include disabled --- packages/react/src/components/RadioButton/next/RadioButton.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react/src/components/RadioButton/next/RadioButton.js b/packages/react/src/components/RadioButton/next/RadioButton.js index b11bc22c97a5..ba4f85e03f10 100644 --- a/packages/react/src/components/RadioButton/next/RadioButton.js +++ b/packages/react/src/components/RadioButton/next/RadioButton.js @@ -9,6 +9,7 @@ import { Text } from '../../Text'; const RadioButton = React.forwardRef(function RadioButton( { className, + disabled, hideLabel, id, labelPosition = 'right', @@ -50,6 +51,7 @@ const RadioButton = React.forwardRef(function RadioButton( onChange={handleOnChange} id={uniqueId} ref={ref} + disabled={disabled} />