-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Add CustomizedSwitches TypeScript demo #15424
Conversation
Updating fork
Updating Fork 4/20
No bundle size changes comparing bdaadb5...991cbd4 |
}, | ||
checked: {}, | ||
focusVisible: {}, | ||
}))(({ classes, ...props }: 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.
From what I understand a user would have to repeat all the Switch props he wants to use in the Props
interace. Is that correct? Could we use SwitchProps
instead? If it's an issue with the withStyles()
API, we can replace it ith the makeStyles
API. It's what I have been doing with a few customization examples.
}, | ||
checked: {}, | ||
focusVisible: {}, | ||
}))(({ classes, ...props }: 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.
From what I understand a user would have to repeat all the Switch props he wants to use in the Props
interace. Is that correct? Could we use SwitchProps
instead? If it's an issue with the withStyles()
API, we can replace it with the makeStyles
API. It's what I have been doing with a few customization examples.
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 apologize, I just started teaching myself TS 6-7 weeks ago, so I'm still learning. Are you suggesting the following? It seems to work fine.
interface Props extends SwitchProps {
classes: Styles;
}
My problem was getting classes and props to place nice for IOSSwitch 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.
Are you suggesting the following? It seems to work fine.
It looks good to me. cc @eps1lon
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.
LGTM
@donigianrp Much appreciated. Thanks |
#14897