-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add MdRadioButton component #127
Conversation
Please set a versioning label of either |
} | ||
|
||
/* Disabled */ | ||
.md-radiobutton--disabled:hover { |
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.
Keep in mind :disabled
is a selector. This works with the disabled
prop on an element. Any reason not to use this?
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.
Copy paste css from existing component. Avoiding refactoring unrelated things and follow existing structure.
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.
E.g prøver å ikke henge meg opp i måten det har blitt gjort tidligere - isåfall burde det refaktorers overalt det er relevant. Men skal se på det.
const classNames = classnames( | ||
'md-radiobutton', | ||
{ | ||
'md-radiobutton--disabled': !!disabled, |
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.
Consider changing this to an element property and style via :disabled
instead
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.
Evt gjøre disse tingene i ny PR så man slipper å lage ulik konvenskjon på tvers av komponenter. Eks. radiobutton bruker :disabled mens radiogroup bruker --disabled. Skal se på det.
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.
Approved based on discussions
Describe your changes
Similarly to MdCheckbox and MdCheckboxGroup, MdRadioGroup needed a "single" component option, to allow for more flexibility.
In addition, clean up some old story-documentation code to follow one standard.
Example of a situation where single radiobuttons is useful (keep in mind to add your own a11y when using these solo):
Checklist before requesting a review
major
,minor
orpatch
)stories
-folder?packages/react/index.tsx
?packages/css/index.css
?