File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 77 OptionInput
88} from "./SwitchSelector.styled" ;
99import { StylingPropsTypes } from "./SwitchSelector.styled" ;
10+ import { defaultColors } from "./defaultColors" ;
1011
1112export type OptionType = {
1213 label : string | number | React . ReactElement | HTMLElement ;
@@ -44,13 +45,13 @@ const SwitchSelector: React.FC<Props> = (props) => {
4445
4546 const {
4647 border = 0 ,
47- backgroundColor = "#ecf0f1" ,
48- selectedBackgroundColor = "#2ecc71" ,
48+ backgroundColor = defaultColors . backgroundColor ,
49+ selectedBackgroundColor = defaultColors . selectedBackgroundColor ,
4950 wrapperBorderRadius = 20 ,
5051 optionBorderRadius = 18 ,
5152 fontSize = 14 ,
52- fontColor = "#000" ,
53- selectedFontColor = "#fff" ,
53+ fontColor = defaultColors . fontColor ,
54+ selectedFontColor = defaultColors . selectedFontColor ,
5455 selectionIndicatorMargin = 2 ,
5556 forcedSelectedIndex
5657 } = props ;
Original file line number Diff line number Diff line change 1+ export const defaultColors = {
2+ backgroundColor : "#ecf0f1" ,
3+ selectedBackgroundColor : "#2ecc71" ,
4+ fontColor : "#000" ,
5+ selectedFontColor : "#fff"
6+ } ;
You can’t perform that action at this time.
0 commit comments