[Doc-43] add stories to atoms#810
Draft
daniel-ilan wants to merge 11 commits intodevfrom
Draft
Conversation
…t-appearing-when-changing-to-english-lang
…ographics into doc-43-add-stories-to-atoms
yuvalbl
reviewed
Nov 19, 2021
| ); | ||
|
|
||
| const IconButton: FC<IProps> = ({ onClick, children }) => <MatIconButton onClick={onClick}>{children}</MatIconButton>; | ||
| const IconButton: FC<IProps> = ({ isSubmit = false, onClick, children }) => ( |
Collaborator
There was a problem hiding this comment.
icon button does not need isSubmit (it is never used for submit)
yuvalbl
reviewed
Nov 19, 2021
|
|
||
| const Template: Story<ComponentProps<typeof AppBar>> = (args) => <AppBar {...args} />; | ||
|
|
||
| export const AppBarS = Template.bind({}); |
Collaborator
There was a problem hiding this comment.
The following can be applied for all stories
- This will leave "AppBarS" to be displayed on the storybook site. rename it so it will have a displayable name
- you can use
ComponentStoryandComponentMetafor better typing: - Atoms with a single story, doesn't need a 3rd level nesting ( 'Components/atoms/AppBar' => 'Components/atoms')
import { ComponentStory, ComponentMeta } from '@storybook/react';
import AppBarComp from '../AppBar';
export default {
title: 'Components/atoms',
component: AppBar,
} as ComponentMeta<typeof AppBarComp>;
const Template: ComponentStory<typeof AppBar> = (args) => <AppBarComp {...args} />;
export const AppBar = Template.bind({});
yuvalbl
reviewed
Nov 19, 2021
| import { AnyWayButton } from '../AnyWayButton'; | ||
|
|
||
| export default { | ||
| title: 'Components/atoms/AnyWayButton', |
Collaborator
There was a problem hiding this comment.
AnyWayButton is about to be refactored / remove, no need a story for this one
yuvalbl
reviewed
Nov 19, 2021
Comment on lines
+38
to
+48
| // export const ButtonOutlinedS = Template.bind({}); | ||
| // ButtonOutlinedS.args = { | ||
| // type: 'outlined', | ||
| // children: 'Button', | ||
| // }; | ||
|
|
||
| // export const ButtonIconS = Template.bind({}); | ||
| // ButtonIconS.args = { | ||
| // type: 'icon', | ||
| // children: 'Button', | ||
| // }; |
yuvalbl
reviewed
Nov 19, 2021
|
|
||
| const Template: Story<ComponentProps<typeof Dialog>> = (args) => <Dialog {...args} />; | ||
|
|
||
| export const DialogS = Template.bind({}); |
Collaborator
There was a problem hiding this comment.
it is not possible to display the dialog from the main content area. can you include a button which will open it?
yuvalbl
reviewed
Nov 19, 2021
| control: { type: 'select' }, | ||
| }, | ||
| }, | ||
| } as unknown as Meta; |
yuvalbl
reviewed
Nov 19, 2021
| } as Meta; | ||
|
|
||
| const Item: FC<ItemProps> = ({ number }) => { | ||
| return <div>Item no^{number}</div>; |
Collaborator
There was a problem hiding this comment.
Suggested change
| return <div>Item no^{number}</div>; | |
| return <div>Item {number}</div>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.