@@ -8,11 +8,10 @@ import {
88 StyledInput ,
99 StyledLabel
1010} from '../common/SwitchBase' ;
11- import { StyledMenuListItem } from '../MenuList/MenuList' ;
1211import { StyledScrollView } from '../ScrollView/ScrollView' ;
1312import { CommonStyledProps } from '../types' ;
1413
15- type RadioVariant = 'default' | 'flat' | 'menu' ;
14+ type RadioVariant = 'default' | 'flat' ;
1615
1716type RadioProps = {
1817 checked ?: boolean ;
@@ -78,15 +77,6 @@ const StyledFlatCheckbox = styled.div<StyledCheckboxProps>`
7877 border-radius: 50%;
7978 }
8079` ;
81- const StyledMenuCheckbox = styled . div `
82- ${ sharedCheckboxStyles }
83- position : relative;
84- display : inline-block;
85- box-sizing : border-box;
86- border : none;
87- outline : none;
88- background : none;
89- ` ;
9080
9181type IconProps = {
9282 'data-testid' : 'checkmarkIcon' ;
@@ -106,34 +96,13 @@ const Icon = styled.span.attrs(() => ({
10696 height: 6px;
10797 transform: translate(-50%, -50%);
10898 border-radius: 50%;
109- ${ ( { $disabled, theme, variant } ) =>
110- variant === 'menu'
111- ? css `
112- background : ${ $disabled
113- ? theme . materialTextDisabled
114- : theme . materialText } ;
115- filter : drop-shadow (
116- 1px 1px 0px
117- ${ $disabled ? theme . materialTextDisabledShadow : 'transparent' }
118- );
119- `
120- : css `
121- background : ${ $disabled ? theme . checkmarkDisabled : theme . checkmark } ;
122- ` }
123- ${ StyledMenuListItem } :hover & {
124- ${ ( { $disabled, theme, variant } ) =>
125- ! $disabled &&
126- variant === 'menu' &&
127- css `
128- background : ${ theme . materialTextInvert } ;
129- ` } ;
130- }
99+ background: ${ p =>
100+ p . $disabled ? p . theme . checkmarkDisabled : p . theme . checkmark } ;
131101` ;
132102
133103const CheckboxComponents = {
134104 flat : StyledFlatCheckbox ,
135- default : StyledCheckbox ,
136- menu : StyledMenuCheckbox
105+ default : StyledCheckbox
137106} ;
138107
139108const Radio = forwardRef < HTMLInputElement , RadioProps > (
0 commit comments