Skip to content

Commit 0c9d7c4

Browse files
WesSouzaarturbien
authored andcommitted
chore(switchbase): convert to TypeScript and export types
1 parent ff380b9 commit 0c9d7c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/SwitchBase/SwitchBase.js renamed to src/SwitchBase/SwitchBase.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ export const StyledInput = styled.input`
1515
z-index: -1;
1616
`;
1717

18-
export const StyledLabel = styled.label`
18+
export const StyledLabel = styled.label<{ $disabled: boolean }>`
1919
display: inline-flex;
2020
align-items: center;
2121
position: relative;
2222
margin: 8px 0;
23-
cursor: ${({ isDisabled }) => (!isDisabled ? 'pointer' : 'auto')};
23+
cursor: ${({ $disabled }) => (!$disabled ? 'pointer' : 'auto')};
2424
user-select: none;
2525
font-size: 1rem;
2626
color: ${({ theme }) => theme.materialText};
27-
${props => props.isDisabled && createDisabledTextStyles()}
27+
${props => props.$disabled && createDisabledTextStyles()}
2828
2929
${StyledListItem} & {
3030
margin: 0;
3131
height: 100%;
3232
}
3333
${StyledListItem}:hover & {
34-
${({ theme, isDisabled }) =>
35-
!isDisabled &&
34+
${({ $disabled, theme }) =>
35+
!$disabled &&
3636
css`
3737
color: ${theme.materialTextInvert};
3838
`};

0 commit comments

Comments
 (0)