Skip to content

Commit

Permalink
feat(datepicker): convert to TypeScript and export types
Browse files Browse the repository at this point in the history
  • Loading branch information
WesSouza authored and arturbien committed Jul 28, 2022
1 parent 38f7cf6 commit 49ab26b
Show file tree
Hide file tree
Showing 8 changed files with 244 additions and 241 deletions.
7 changes: 7 additions & 0 deletions .storybook/manager.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* Remove from the sidebar menu stories that contains "unstable" */
a[data-item-id$='-unstable'].sidebar-item,
a[data-item-id*='-unstable-'].sidebar-item,
button[data-item-id$='-unstable'].sidebar-item,
button[data-item-id$='-unstable-'].sidebar-item {
display: none !important;
}
1 change: 1 addition & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './manager.css';
217 changes: 0 additions & 217 deletions src/DatePicker/DatePicker.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/DatePicker/DatePicker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: DatePicker
menu: Components
---

import DatePicker from './DatePicker';
import { DatePicker } from './DatePicker';

# DatePicker

Expand Down
23 changes: 0 additions & 23 deletions src/DatePicker/DatePicker.stories.js

This file was deleted.

23 changes: 23 additions & 0 deletions src/DatePicker/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* eslint-disable camelcase, react/jsx-pascal-case */
import { ComponentMeta } from '@storybook/react';
import { DatePicker__UNSTABLE } from 'react95';
import styled from 'styled-components';

const Wrapper = styled.div`
padding: 5rem;
background: ${({ theme }) => theme.desktopBackground};
`;

export default {
title: 'DatePicker__UNSTABLE',
component: DatePicker__UNSTABLE,
decorators: [story => <Wrapper>{story()}</Wrapper>]
} as ComponentMeta<typeof DatePicker__UNSTABLE>;

export function Default() {
return <DatePicker__UNSTABLE onAccept={date => console.log(date)} />;
}

Default.story = {
name: 'default'
};
Loading

0 comments on commit 49ab26b

Please sign in to comment.