Skip to content

Commit

Permalink
support types for ToggleButton and revert ButtonGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jul 6, 2021
1 parent b7486ed commit 04b2903
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/pages/api-docs/button-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"color": {
"type": {
"name": "union",
"description": "'inherit'<br>&#124;&nbsp;'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;'error'<br>&#124;&nbsp;'info'<br>&#124;&nbsp;'success'<br>&#124;&nbsp;'warning'<br>&#124;&nbsp;string"
"description": "'inherit'<br>&#124;&nbsp;'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;string"
},
"default": "'primary'"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/toggle-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"size": {
"type": {
"name": "union",
"description": "'large'<br>&#124;&nbsp;'medium'<br>&#124;&nbsp;'small'<br>&#124;&nbsp;string"
"description": "'standard'<br>&#124;&nbsp;'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;'error'<br>&#124;&nbsp;'info'<br>&#124;&nbsp;'success'<br>&#124;&nbsp;'warning'<br>&#124;&nbsp;string"
},
"default": "'medium'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ButtonGroup/ButtonGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface ButtonGroupTypeMap<P = {}, D extends React.ElementType = 'div'>
* @default 'primary'
*/
color?: OverridableStringUnion<
'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
'inherit' | 'primary' | 'secondary',
ButtonGroupPropsColorOverrides
>;
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ButtonGroup/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ ButtonGroup.propTypes /* remove-proptypes */ = {
* @default 'primary'
*/
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']),
PropTypes.oneOf(['inherit', 'primary', 'secondary']),
PropTypes.string,
]),
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ToggleButton/ToggleButton.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type ToggleButtonTypeMap<
* The color of the button when it is in an active state.
* @default 'standard'
*/
color?: 'standard' | 'primary' | 'secondary';
color?: 'standard' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
/**
* If `true`, the component is disabled.
* @default false
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/ToggleButton/ToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ ToggleButton.propTypes /* remove-proptypes */ = {
* @default 'medium'
*/
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['large', 'medium', 'small']),
PropTypes.oneOf(['standard', 'primary', 'secondary', 'error', 'info', 'success', 'warning']),
PropTypes.string,
]),
/**
Expand Down

0 comments on commit 04b2903

Please sign in to comment.