Browse Source

Add StyledToggle component

master
jeffvli 3 years ago
committed by Jeff
parent
commit
30672f1b81
  1. 9
      src/components/shared/styled.ts

9
src/components/shared/styled.ts

@ -16,6 +16,7 @@ import {
TagPicker, TagPicker,
Tag, Tag,
CheckPicker, CheckPicker,
Toggle,
} from 'rsuite'; } from 'rsuite';
import styled from 'styled-components'; import styled from 'styled-components';
import TagLink from './TagLink'; import TagLink from './TagLink';
@ -177,6 +178,14 @@ export const StyledCheckbox = styled(Checkbox)`
} }
`; `;
export const StyledToggle = styled(Toggle)`
background-color: ${(props) => (props.checked ? props.theme.colors.primary : '')} !important;
.rs-btn-toggle-inner {
color: ${(props) => (props.checked ? props.theme.colors.button.primary.color : '')} !important;
}
`;
export const StyledRadio = styled(Radio)` export const StyledRadio = styled(Radio)`
div { div {
label { label {

Loading…
Cancel
Save