Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneeza committed Dec 13, 2023
2 parents f1ec0ce + 7e1b422 commit 9fdbee3
Show file tree
Hide file tree
Showing 63 changed files with 865 additions and 592 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-walls-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/icon': minor
---

Adds `'Camera'` to glyph set
1 change: 1 addition & 0 deletions packages/date-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"devDependencies": {
"@leafygreen-ui/button": "^21.0.7",
"@leafygreen-ui/modal":"^16.0.3",
"@leafygreen-ui/testing-lib": "^0.3.4",
"mockdate": "^3.0.5",
"storybook-mock-date-decorator": "^1.0.1",
"timezone-mock": "^1.3.6",
Expand Down
29 changes: 18 additions & 11 deletions packages/date-picker/src/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ import React, { useState } from 'react';
import { StoryFn } from '@storybook/react';

import Button from '@leafygreen-ui/button';
import { Month, newUTC } from '@leafygreen-ui/date-utils';
import {
Month,
newUTC,
testLocales,
testTimeZoneLabels,
} from '@leafygreen-ui/date-utils';
import LeafyGreenProvider from '@leafygreen-ui/leafygreen-provider';
import { StoryMetaType } from '@leafygreen-ui/lib';
import Modal from '@leafygreen-ui/modal';
import { Size } from '@leafygreen-ui/tokens';

import {
DatePickerContextProps,
DatePickerProvider,
} from './shared/components/DatePickerContext';
import { MAX_DATE, MIN_DATE } from './shared/constants';
import {
SharedDatePickerContextProps,
SharedDatePickerProvider,
} from './shared/context';
import { getProviderPropsFromStoryContext } from './shared/testutils/getProviderPropsFromStoryContext';
import { Locales, TimeZones } from './shared/testutils/testValues';
import { AutoComplete } from './shared/types';
import { DatePicker } from './DatePicker';

Expand All @@ -25,14 +29,14 @@ const ProviderWrapper = (Story: StoryFn, ctx: any) => {

return (
<LeafyGreenProvider {...leafyGreenProviderProps}>
<DatePickerProvider {...datePickerProviderProps}>
<SharedDatePickerProvider {...datePickerProviderProps}>
<Story {...storyProps} />
</DatePickerProvider>
</SharedDatePickerProvider>
</LeafyGreenProvider>
);
};

const meta: StoryMetaType<typeof DatePicker, DatePickerContextProps> = {
const meta: StoryMetaType<typeof DatePicker, SharedDatePickerContextProps> = {
title: 'Components/DatePicker/DatePicker',
component: DatePicker,
decorators: [ProviderWrapper],
Expand Down Expand Up @@ -69,14 +73,17 @@ const meta: StoryMetaType<typeof DatePicker, DatePickerContextProps> = {
},
argTypes: {
baseFontSize: { control: 'select' },
locale: { control: 'select', options: Locales },
locale: { control: 'select', options: testLocales },
description: { control: 'text' },
label: { control: 'text' },
min: { control: 'date' },
max: { control: 'date' },
size: { control: 'select' },
state: { control: 'select' },
timeZone: { control: 'select', options: [undefined, ...TimeZones] },
timeZone: {
control: 'select',
options: [undefined, ...testTimeZoneLabels],
},
autoComplete: { control: 'select', options: Object.values(AutoComplete) },
},
};
Expand Down
Loading

0 comments on commit 9fdbee3

Please sign in to comment.