-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(store-ui): Improve atoms pattern consistency #819
Conversation
✔️ Deploy Preview for storeui ready! 🔨 Explore the source changes: 34001da 🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/60ef35ba47df5f0008f252ca 😎 Browse the preview: https://deploy-preview-819--storeui.netlify.app |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 34001da:
|
@@ -13,18 +14,22 @@ const ButtonTemplate: Story<ButtonProps> = ({ children, onClick, testId }) => ( | |||
|
|||
export const Button = ButtonTemplate.bind({}) | |||
|
|||
const constrols: ComponentArgTypes<ButtonProps> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const constrols: ComponentArgTypes<ButtonProps> = { | |
const argTypes: ComponentArgTypes<ButtonProps> = { |
table: { disable: true }, | ||
}, | ||
} | ||
|
||
export default { | ||
title: 'Atoms/Button', | ||
component: Button, | ||
argTypes: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argTypes: { | |
argTypes, |
...constrols, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...constrols, | |
}, |
|
||
const IconTemplate: Story<IconProps> = ({ style }) => ( | ||
<Component style={style} component={<ShoppingCart />} /> | ||
) | ||
|
||
export const Icon = IconTemplate.bind({}) | ||
|
||
const controls: ComponentArgTypes<Omit<IconProps, 'component'>> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const controls: ComponentArgTypes<Omit<IconProps, 'component'>> = { | |
const argTypes: ComponentArgTypes<Omit<IconProps, 'component'>> = { |
table: { disable: true }, | ||
}, | ||
} | ||
|
||
export default { | ||
title: 'Atoms/Icon', | ||
component: Icon, | ||
argTypes: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argTypes: { | |
argTypes, |
table: { disable: true }, | ||
}, | ||
} | ||
|
||
export default { | ||
title: 'Molecules/Bullets', | ||
component: Bullets, | ||
argTypes: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argTypes: { | |
argTypes, |
...controls, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...controls, | |
}, |
@@ -22,17 +23,21 @@ const CustomIconTemplate: Story<SearchInputProps> = ({ | |||
|
|||
export const CustomIcon = CustomIconTemplate.bind({}) | |||
|
|||
const controls: ComponentArgTypes<SearchInputProps> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const controls: ComponentArgTypes<SearchInputProps> = { | |
const argTypes: ComponentArgTypes<SearchInputProps> = { |
table: { disable: true }, | ||
}, | ||
} | ||
|
||
export default { | ||
title: 'Molecules/SearchInput', | ||
argTypes: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argTypes: { | |
argTypes, |
...controls, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...controls, | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!! after @emersonlaurentino changes, it's lgtm
182b2a0
to
b9f2d14
Compare
b9f2d14
to
34001da
Compare
* Create type to avoid wrong props inside StoryBook argtypes * Change TextArea state prop to variant * Change Input state prop to variant * Improve atoms argtypes type * Improve molecules argtypes * Fix Checkbox export * Fix request changes
What's the purpose of this pull request?
Added:
Changed:
How it works?
How to test it?
https://github.com/vtex-sites/btglobal.store/pull/708
References