Skip to content

Commit

Permalink
add components to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
mvoloshin0458 committed Mar 7, 2023
1 parent fb89808 commit d7296ba
Show file tree
Hide file tree
Showing 24 changed files with 1,804 additions and 1,615 deletions.
9 changes: 9 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import '../src/style/theme.scss'
import '../src/style/app.scss'
import { BrowserRouter as Router } from 'react-router-dom';

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand All @@ -10,3 +11,11 @@ export const parameters = {
},
},
}

export const decorators = [
(Story) => (
<Router>
<Story />
</Router>
),
];
48 changes: 40 additions & 8 deletions dist/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/cjs/types/components/Table/Table.stories.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { default as TableComponent } from './Table';
import { ComponentStory, ComponentMeta } from '@storybook/react';
declare const _default: ComponentMeta<typeof TableComponent>;
export default _default;
export declare const Table: ComponentStory<typeof TableComponent>;
4 changes: 2 additions & 2 deletions dist/cjs/types/components/inputs/Checkbox/Checkbox.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="react" />
import { InputHTMLAttributes } from 'react';
import './checkbox.scss';
declare function Checkbox(props: any): JSX.Element;
declare function Checkbox(props: InputHTMLAttributes<HTMLInputElement>): JSX.Element;
export default Checkbox;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { default as CheckboxComponent } from './Checkbox';
import { ComponentStory, ComponentMeta } from '@storybook/react';
declare const _default: ComponentMeta<typeof CheckboxComponent>;
export default _default;
export declare const Checkbox: ComponentStory<typeof CheckboxComponent>;
2 changes: 1 addition & 1 deletion dist/cjs/types/components/inputs/TextArea/TextArea.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactElement } from 'react';
import './textArea.scss';
interface TextAreaProps {
export interface TextAreaProps {
onChange?: (newVal: any) => void;
value?: any;
wrapperClass?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="react" />
import { ComponentStory, ComponentMeta } from '@storybook/react';
declare const _default: ComponentMeta<(props: import("./TextArea").TextAreaProps) => JSX.Element>;
export default _default;
export declare const TextArea: ComponentStory<(props: import("./TextArea").TextAreaProps) => JSX.Element>;
46 changes: 39 additions & 7 deletions dist/esm/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/esm/types/components/Table/Table.stories.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { default as TableComponent } from './Table';
import { ComponentStory, ComponentMeta } from '@storybook/react';
declare const _default: ComponentMeta<typeof TableComponent>;
export default _default;
export declare const Table: ComponentStory<typeof TableComponent>;
4 changes: 2 additions & 2 deletions dist/esm/types/components/inputs/Checkbox/Checkbox.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="react" />
import { InputHTMLAttributes } from 'react';
import './checkbox.scss';
declare function Checkbox(props: any): JSX.Element;
declare function Checkbox(props: InputHTMLAttributes<HTMLInputElement>): JSX.Element;
export default Checkbox;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { default as CheckboxComponent } from './Checkbox';
import { ComponentStory, ComponentMeta } from '@storybook/react';
declare const _default: ComponentMeta<typeof CheckboxComponent>;
export default _default;
export declare const Checkbox: ComponentStory<typeof CheckboxComponent>;
2 changes: 1 addition & 1 deletion dist/esm/types/components/inputs/TextArea/TextArea.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactElement } from 'react';
import './textArea.scss';
interface TextAreaProps {
export interface TextAreaProps {
onChange?: (newVal: any) => void;
value?: any;
wrapperClass?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="react" />
import { ComponentStory, ComponentMeta } from '@storybook/react';
declare const _default: ComponentMeta<(props: import("./TextArea").TextAreaProps) => JSX.Element>;
export default _default;
export declare const TextArea: ComponentStory<(props: import("./TextArea").TextAreaProps) => JSX.Element>;
4 changes: 2 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="react" />
import React, { MouseEventHandler, ReactNode, ReactElement } from 'react';
import React, { MouseEventHandler, ReactNode, ReactElement, InputHTMLAttributes } from 'react';
import { CellProps, Row, Column, UseExpandedRowProps, UseRowStateRowProps, UseRowStateCellProps, UseRowStateLocalState, CellValue } from 'react-table';
import { DateTime } from 'luxon';

Expand Down Expand Up @@ -51,7 +51,7 @@ interface InfoProps {
}
declare function Info({ data }: InfoProps): JSX.Element;

declare function Checkbox(props: any): JSX.Element;
declare function Checkbox(props: InputHTMLAttributes<HTMLInputElement>): JSX.Element;

interface DataInfoProps {
label: string;
Expand Down
Loading

0 comments on commit d7296ba

Please sign in to comment.