Skip to content

Commit

Permalink
fix(static-past-time-picker): fix style (#1886)
Browse files Browse the repository at this point in the history
Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin committed Mar 4, 2022
1 parent ccbd545 commit 694345a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
9 changes: 8 additions & 1 deletion src/static-past-time-picker/SinceRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ function SinceRangePicker({ disabledDate, timeRange, onSelect, onCancel, experim
setEndKey(e.target.value);
}}
>
{endDateKeys.map((o: string) => o && <SwitchGroup.Item value={o}>{END_DATE_MAPPING[o]}</SwitchGroup.Item>)}
{endDateKeys.map(
(o: string) =>
o && (
<SwitchGroup.Item key={o} value={o}>
{END_DATE_MAPPING[o]}
</SwitchGroup.Item>
)
)}
</SwitchGroup>
</span>
</>
Expand Down
21 changes: 7 additions & 14 deletions src/static-past-time-picker/style/QuickPicker.less
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
@import '../../stylesheet/index.less';
@import '../../stylesheet/mixin/index.less';
@import '../../stylesheet/variables/index.less';
@import (reference) '../../stylesheet/variables/index.less';
@import (reference) '../../list/style/index.less';

@quick-picker-prefix-cls: ~'@{component-prefix}-quick-picker';

.@{quick-picker-prefix-cls} {
&__list {
display: flex;
min-width: 280px;
.gio-list {
flex-direction: row;
flex-wrap: wrap;
.@{list-prefix-cls} {
display: grid;
grid-auto-rows: 36px;
grid-template-columns: 144px 136px;
column-gap: 8px;
.gio-list--item {
.@{list-prefix-cls}--item {
box-sizing: content-box;
width: 104px;
}
}
}

&__bottom {
align-items: center;
justify-content: space-between;
box-sizing: content-box;
height: 30px;
padding: 8px 16px 16px 16px;
Expand All @@ -31,7 +27,4 @@
float: right;
}
}

width: fit-content;
max-width: fit-content;
}
9 changes: 2 additions & 7 deletions src/static-past-time-picker/style/index.less
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
@import '../../stylesheet/index.less';
@import '../../stylesheet/mixin/index.less';
@import '../../stylesheet/variables/index.less';
@import (reference) '../../stylesheet/variables/index.less';

@past-time-static-picker-prefix-cls: ~'@{component-prefix}-static-past-time-picker';

.@{past-time-static-picker-prefix-cls} {
display: flex;
width: fit-content;
max-width: fit-content;
background: #fff;
border-radius: 4px;

&__time-mode {
box-sizing: border-box;
width: 160px;
min-width: 160px;
padding: 8px;
border-right: 1px solid @gray-2;
}

&__panel {
box-sizing: border-box;
min-width: 280px;
}
}

1 comment on commit 694345a

@vercel
Copy link

@vercel vercel bot commented on 694345a Mar 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.