Skip to content

Commit 8508f08

Browse files
authored
style(datepicker): add primary/white variant to datepicker (#255)
1 parent c3dbda0 commit 8508f08

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/components/datepicker/datepicker.stories.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const Template: Story<DatePickerProps> = (props) => {
1818
<DatePicker
1919
{...props}
2020
selectProps={{
21+
...props.selectProps,
2122
value: [new Date(startDate).toISOString()],
2223
options: [],
2324
onChange: () => {},

src/components/datepicker/index.tsx

+4-9
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@ const DatePicker: FC<DatePickerProps & ReactDatePickerProps> = ({
2828
alignItems="center"
2929
onClick={() => setOpen(!open)}
3030
sx={{
31-
backgroundColor: 'white',
32-
cursor: 'pointer',
3331
height: '32px',
3432
px: '5px',
35-
borderColor: 'white',
3633
borderWidth: '1px',
3734
borderStyle: 'solid',
38-
':hover': {
39-
borderColor: 'grayShade2',
40-
borderWidth: '1px',
41-
borderStyle: 'solid',
42-
},
35+
...(open ? { borderColor: 'grayShade1' } : {}),
4336
}}
37+
variant={selectProps.variant ?? 'white'}
38+
tx="variants.select"
4439
>
4540
<Labeling gray mr="5px">
4641
{selectProps.noDataMessage}
@@ -51,7 +46,7 @@ const DatePicker: FC<DatePickerProps & ReactDatePickerProps> = ({
5146
>
5247
{selectProps.value}
5348
</Value>
54-
<GetIcon icon={IconName.arrow_up_down} size='sm' />
49+
<GetIcon icon={IconName.arrow_up_down} size="sm" />
5550
</Flex>
5651
<Box alignSelf={datePickerAlign === 'right' ? 'flex-end' : 'flex-start'}>
5752
<ReactDatePicker

0 commit comments

Comments
 (0)