[ToggleButton] docs: missing "size" property in the API docs
See original GitHub issueI’m checking current API documentation for ToggleButton https://material-ui.com/api/toggle-button/, and I don’t see the size
prop being mentioned there. But, the size
property does affect the size of the ToggleButton
. (I’m using the ToggleButton as a standalone though, not within the ToggleButtonGroup
.)
Exploring the code for 4.11.0 I see this: https://github.com/mui-org/material-ui/blob/v4.11.0/packages/material-ui-lab/src/ToggleButton/ToggleButton.js#L78 https://github.com/mui-org/material-ui/blob/v4.11.0/packages/material-ui-lab/src/ToggleButton/ToggleButton.js#L159-L162
And in the next
branch this:
Does this mean the property is intentionally missing from the API, as it is not intended to be used by the users, so that it is only used internally by the enclosing ToggleButtonGroup
component?
- [ X] The issue is present in the latest release.
- [ X] I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Expected Behavior 🤔
Steps to Reproduce 🕹
Steps:
Context 🔦
Your Environment 🌎
Tech | Version |
---|---|
Material-UI | v4.11.0 |
React | |
Browser | |
TypeScript | |
etc. |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (15 by maintainers)
Top GitHub Comments
Whe should remove mention of any implementation specifics. If this is important for the usage (interface) then describe that instead of concrete methods used.
@croraf The latest change was in #21687 with @eps1lon, however, the size prop was already ignored before that. In any case, I think that it was before we made a standalone ToggleButton a viable use case.