Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Minor fixes and suggestions. #6

Merged
merged 3 commits into from
Feb 17, 2021
Merged

Minor fixes and suggestions. #6

merged 3 commits into from
Feb 17, 2021

Conversation

sherakama
Copy link
Member

READY FOR REVIEW


/**
* Button Component
*
* HTML button element
*/
export const Button = ({ className, children, onClick, ref, ...props }) => {
export const Button = ({ className, children, onClick, ref, variant, size, type, isDisabled, ...props }) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you destructure each of the levers in the constructor you can keep the {...props} on the button HTML element which might come in handy. If you don't destructure the props arg then you can't use {...props} on the HTML element as React doesn't know what to do with props like isDisabled: bool

Comment on lines +51 to +52
default:
levers.size = classnames('su-px-26 su-py-10 su-text-20');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved default to the default so you don't have to pass in the keyword default.

src/Button/Button.js Outdated Show resolved Hide resolved
yvonnetangsu and others added 2 commits February 16, 2021 23:30
Co-authored-by: Sherakama <sherakama@gmail.com>
Co-authored-by: Sherakama <sherakama@gmail.com>
Copy link
Member

@yvonnetangsu yvonnetangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool - thanks!

@yvonnetangsu yvonnetangsu merged commit f980b13 into variants-yt Feb 17, 2021
@yvonnetangsu yvonnetangsu deleted the suggestions branch February 17, 2021 07:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants