diff --git a/src/common/RadioButton/RadioButton.less b/src/common/RadioButton/RadioButton.less index ec77cfe0b..5cf33b3a4 100644 --- a/src/common/RadioButton/RadioButton.less +++ b/src/common/RadioButton/RadioButton.less @@ -5,66 +5,51 @@ align-items: center; overflow: visible; - label { + .radio-container { + position: relative; + width: 1.75rem; + height: 1.75rem; + border: 3px solid var(--color-placeholder); + border-radius: 1rem; + background-color: transparent; display: flex; align-items: center; + justify-content: center; + transition: all 0.2s ease-in-out; cursor: pointer; + outline: none; + user-select: none; + margin-right: 0.75rem; - .disabled { - cursor: not-allowed; - - .radio-container { - cursor: not-allowed; - } - } - - .error { - .radio-container { - border-color: var(--color-trakt); - } - } - - .not-selected { - background-color: transparent; - border-color: var(--color-placeholder); - - .radio-container .inner-circle { - background-color: transparent; - opacity: 0; - } - } - - .radio-container { - position: relative; - width: 1.75rem; - height: 1.75rem; - border: 3px solid var(--color-placeholder); - border-radius: 1rem; - background-color: transparent; - display: flex; - align-items: center; - justify-content: center; - transition: all 0.2s ease-in-out; + input[type='radio'] { + opacity: 0; + width: 0; + height: 0; + position: absolute; cursor: pointer; - outline: none; - user-select: none; - margin-right: 0.75rem; + } - input[type='radio'] { - opacity: 0; - width: 0; - height: 0; - position: absolute; - cursor: pointer; - } + .inner-circle { + width: 1.25rem; + height: 1.25rem; + border-radius: 0.675rem; + border: 2px solid var(--secondary-background-color); + transition: opacity 0.2s ease-in-out; + background-color: transparent; + opacity: 0; + } + &.disabled { + cursor: not-allowed; + } + + &.error { + border-color: var(--color-trakt); + } + + &.selected { .inner-circle { - width: 1.25rem; - height: 1.25rem; background-color: var(--primary-accent-color); - border-radius: 0.675rem; - border: 2px solid var(--secondary-background-color); - transition: opacity 0.2s ease-in-out; opacity: 1; } } diff --git a/src/common/RadioButton/RadioButton.tsx b/src/common/RadioButton/RadioButton.tsx index bb3d13f40..e3cfd06bd 100644 --- a/src/common/RadioButton/RadioButton.tsx +++ b/src/common/RadioButton/RadioButton.tsx @@ -30,29 +30,25 @@ const RadioButton = ({ disabled, selected, className, onChange, error }: Props)