-
-
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
[TypeScript] Switch is missing keyboardFocused class key #10976
Comments
There may be more to it actually. When using [email protected] I receive a console error when trying to use the
However the TypeScript definitions are happy for me to provide a |
@ianschmitz No, it shouldn't. The Going back to your issue. Do you need the |
Yes a With regards to the inheritance, i was under the assumption that the inherited classes would flow through to the rendered component. i.e. I agree that the |
@ianschmitz It sounds like:
|
Would it be reasonable to add |
@ianschmitz I'm happy with this too, but you need to add it to all the components along the chain: Switch > SwitchBase > IconButton. This is going to be quite some boilerplate. |
I'm happy either way. Thanks @oliviertassinari ! I agree keyboard focused states are super useful. We can do some pretty nifty styling with it. We were able to completely redesign the styling of MUI's |
To clarify this, both the |
@oliviertassinari I think this issue is a little more wide spread than I initially thought. I just tried using
In the case of |
@ianschmitz I'm adding this issue to the v1 milestone. We need to sort that out before the stable release. We might need to introduce a breaking change. |
@oliviertassinari, this broke the behavior of lots of parts of our application. Property/classes related change is not appropriate as it should behave/look the same on the whole application and possible to do with theme/overrides or something like that. If there is another issue already created please link it here - I'll follow there. |
@Z-AX I see your point. Of course you could wrap each component. But a |
@oliviertassinari actually, I'm more into the |
But at least I want the consistent outline, reused everywhere :) |
Looks like the definition for
Switch
or one of its inherited definitions was updated recently which removed thekeyboardFocused
class key.I wonder if SwitchBase's
SwitchBaseClassKey
definition should also includeIconButtonClassKey
?https://github.com/mui-org/material-ui/blob/466c01fc7e7bc76adf5ad34da125daff43a1b206/src/internal/SwitchBase.d.ts#L23
The text was updated successfully, but these errors were encountered: