-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTimeExamples.stories.tsx
More file actions
48 lines (45 loc) · 1.29 KB
/
TimeExamples.stories.tsx
File metadata and controls
48 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { Meta } from '@storybook/react-vite';
import { HorizontalExample, VerticalExample } from './TestAxis.js';
export default {
title: 'Hooks/static/useTimeTicks',
component: HorizontalExample || VerticalExample,
} as Meta;
interface Props {
domain: [number | Date, number | Date];
}
export function HorizontalCentaines(props: Props) {
return <HorizontalExample {...props} type="time" />;
}
HorizontalCentaines.args = {
domain: [Date.now(), Date.now() + 24 * 60 * 60 * 1000],
};
HorizontalCentaines.storyName = 'Horizontal centaines';
export function HorizontalCentainesBottom() {
return (
<HorizontalExample
domain={[new Date(2000, 0, 1, 16), new Date(2000, 0, 1, 20)]}
orientation="bottom"
type="time"
/>
);
}
HorizontalCentainesBottom.storyName = 'Horizontal centaines bottom';
export function VerticalCentaines() {
return (
<VerticalExample
domain={[new Date(2000, 0, 1, 16), new Date(2000, 0, 1, 19)]}
type="time"
/>
);
}
VerticalCentaines.storyName = 'Vertical centaines';
export function VerticalCentainesRight() {
return (
<VerticalExample
domain={[new Date(2000, 0, 1, 16), new Date(2000, 0, 1, 17)]}
orientation="right"
type="time"
/>
);
}
VerticalCentainesRight.storyName = 'Vertical centaines right';