Skip to content

Commit

Permalink
Initial DateRangeInput
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Oct 30, 2024
1 parent 84b619d commit 9d8c5b2
Show file tree
Hide file tree
Showing 4 changed files with 526 additions and 6 deletions.
13 changes: 8 additions & 5 deletions packages/circuit-ui/components/DateInput/DateInput.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@
line-height: var(--cui-body-m-line-height);
}

.readonly .literal {
.divider {
padding: var(--cui-spacings-bit);
font-size: var(--cui-body-m-font-size);
line-height: var(--cui-body-m-line-height);
}

.readonly .literal,
.readonly .divider {
color: var(--cui-fg-subtle);
}

Expand Down Expand Up @@ -167,10 +174,6 @@
}

@media (min-width: 480px) {
.apply {
display: none;
}

.presets {
position: sticky;
bottom: 0;
Expand Down
10 changes: 10 additions & 0 deletions packages/circuit-ui/components/DateInput/DateInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useState } from 'react';
import { Stack } from '../../../../.storybook/components/index.js';

import { DateInput, type DateInputProps } from './DateInput.js';
import { DateRangeInput, type DateRangeInputProps } from './DateRangeInput.js';

export default {
title: 'Forms/DateInput',
Expand Down Expand Up @@ -174,3 +175,12 @@ export const Locales = (args: DateInputProps) => (
);

Locales.args = baseArgs;

export const Range = (args: DateRangeInputProps) => (
<DateRangeInput {...args} />
);

Range.args = {
...baseArgs,
label: 'Trip dates',
};
Loading

0 comments on commit 9d8c5b2

Please sign in to comment.