-
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
feat(store-ui): Loading Button molecule #962
Conversation
✔️ Deploy Preview for storeui ready! 🔨 Explore the source changes: d19ab27 🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/6171a3628bf3a50008627adb 😎 Browse the preview: https://deploy-preview-962--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 d19ab27:
|
04e7ff7
to
3012f10
Compare
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.
I'm questioning the existence of this component, and for me, it's the same thing as the IconButton. It's the Button component with a slight difference in render child. By doing this, we are just adding one more component to maintain. Does it make sense? Take a look on this article: https://kentcdodds.com/blog/inversion-of-control
We can still have this component for internal purposes but not expose it through API.
@igorbrasileiro Lets talk about this subject again in our refinement. I'm not 100% satisfied about these components as well. Gonna let this one in standby meanwhile. |
3012f10
to
a81e537
Compare
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.
Great job, @Gmantiqueira! 👏 🚀
packages/store-ui/src/molecules/LoadingButton/LoadingButton.tsx
Outdated
Show resolved
Hide resolved
|
||
const LoadingButton = forwardRef<HTMLButtonElement, LoadingButtonProps>( | ||
function LoadingButton( | ||
{ children, loading, testId = 'store-loading-button', ...props }, |
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.
How about
{ children, loading, testId = 'store-loading-button', ...props }, | |
{ children, loading, testId = 'store-loading-button', ...rest }, |
?
I'm. a bit skeptical of using the props
word when it doesn't really mean the same thing as "all props received by the component". I think it might be confusing
3ddce61
to
dd119b3
Compare
Create List component as an Atom.
* Add skeleton atom * Move animation to theme * Import tailwind utilities * Update test * Use only 1 div * Update story * Extend HTMLDivElement
dd119b3
to
d19ab27
Compare
What's the purpose of this pull request?
As the title says, this PR creates the Loading Button molecule.
- Updating stores with this component (WIP).
How it works?
How to test it?
References