-
Notifications
You must be signed in to change notification settings - Fork 1
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/switch light theme #609
Conversation
|
@@ -12,6 +17,29 @@ export type SwitchProps = Omit< | |||
| 'touchRippleRef' | |||
>; | |||
|
|||
export const Switch = (args: SwitchProps): JSX.Element => { | |||
const CheckedIconSwitch = styled(MuiSwitch)(({ theme }) => ({ |
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.
do we also want to fix this for legacy theme?
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.
Oh, yeah, good call. I'll fix it.
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.
Fixed
args: { | ||
sx: { marginRight: '6px' }, | ||
inputProps: { | ||
'aria-label': 'example', |
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.
Personally, I prefer the bare component with no label for the primary story, but if we're keeping FormControlLabel
let's ditch the aria-label
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 had a conversation with UX about this. The pattern in zeroheight expects an action label, so this would be the most common use case.
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.
but the primary story isn't related to use case, it's the component itself... i think UX is misunderstanding that dev docs are different than their use cases.
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.
That makes sense. I switched back to the Switch story being a bare Switch component and added the With Label story.
No description provided.