Skip to content

Commit

Permalink
feat(universal-date-input): improve after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fulcanellee committed Sep 2, 2024
1 parent 2c61d5f commit e258def
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions .changeset/loud-plants-judge.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'@alfalab/core-components-select': minor
'@alfalab/core-components-side-panel': minor
'@alfalab/core-components-themes': minor
'@alfalab/core-components-universal-date-input': minor
---

Обновление темы corp
2 changes: 2 additions & 0 deletions packages/themes/src/mixins/corp.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@import './icon-button/corp.css';
@import './select/corp.css';
@import './tag/corp.css';
@import './universal-date-input/corp.css';

@define-mixin theme-corp {
@mixin button-corp;
Expand All @@ -14,4 +15,5 @@
@mixin icon-button-corp;
@mixin select-corp;
@mixin tag-corp;
@mixin universal-date-input-corp;
}
4 changes: 4 additions & 0 deletions packages/themes/src/mixins/universal-date-input/corp.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@define-mixin universal-date-input-corp {
/* border */
--calendar-popover-border-radius: var(--border-radius-12);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from '../../utils';

import styles from '../../index.module.css';
import desktopStyles from './date-input.desktop.module.css';

function getDefaultValue(defaultValue?: Date | number | string, withTime?: boolean) {
if (defaultValue !== undefined) {
Expand Down Expand Up @@ -255,6 +256,7 @@ export const DateInput = forwardRef<HTMLInputElement, InnerDateInputProps>(
popperClassName={cn(
styles.calendarContainer,
popoverProps?.popperClassName,
desktopStyles.calendarContainer,
)}
withTransition={false}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import '../../vars.css';

.calendarContainer {
border-radius: var(--calendar-popover-border-radius);
}
6 changes: 1 addition & 5 deletions packages/universal-date-input/src/index.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
@import '../../themes/src/default.css';
@import '../../calendar/src/vars.css';

:root {
--calendar-icon-color: var(--color-light-neutral-translucent-700);
--calendar-popover-border-radius: var(--border-radius-m);
}
@import './vars.css';

.wrapper {
display: inline-block;
Expand Down
6 changes: 6 additions & 0 deletions packages/universal-date-input/src/vars.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:root {
--calendar-icon-color: var(--color-light-neutral-translucent-700);

/* border */
--calendar-popover-border-radius: var(--border-radius-8);
}

0 comments on commit e258def

Please sign in to comment.