Skip to content

Commit

Permalink
Migrate ButtonGroup to emotion
Browse files Browse the repository at this point in the history
  • Loading branch information
mirefly committed Feb 5, 2021
1 parent 53d2741 commit 3d26ec2
Show file tree
Hide file tree
Showing 9 changed files with 294 additions and 206 deletions.
3 changes: 2 additions & 1 deletion docs/pages/api-docs/button-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"default": "'medium'"
},
"sx": { "type": { "name": "object" } },
"variant": {
"type": {
"name": "union",
Expand Down Expand Up @@ -72,6 +73,6 @@
"filename": "/packages/material-ui/src/ButtonGroup/ButtonGroup.js",
"inheritance": null,
"demos": "<ul><li><a href=\"/components/button-group/\">Button Group</a></li></ul>",
"styledComponent": false,
"styledComponent": true,
"cssComponent": false
}
1 change: 1 addition & 0 deletions docs/translations/api-docs/button-group/button-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"fullWidth": "If <code>true</code>, the buttons will take up the full width of its container.",
"orientation": "The component orientation (layout flow direction).",
"size": "The size of the component. <code>small</code> is equivalent to the dense button styling.",
"sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the <a href=\"/system/basics/#the-sx-prop\">`sx` page</a> for more details.",
"variant": "The variant to use."
},
"classDescriptions": {
Expand Down
6 changes: 6 additions & 0 deletions packages/material-ui/src/ButtonGroup/ButtonGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as React from 'react';
import { SxProps } from '@material-ui/system';
import { OverridableStringUnion } from '@material-ui/types';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '..';

export interface ButtonGroupPropsVariantOverrides {}
export type ButtonGroupVariantDefaults = Record<'text' | 'outlined' | 'contained', true>;
Expand Down Expand Up @@ -114,6 +116,10 @@ export interface ButtonGroupTypeMap<P = {}, D extends React.ElementType = 'div'>
* @default 'outlined'
*/
variant?: OverridableStringUnion<ButtonGroupVariantDefaults, ButtonGroupPropsVariantOverrides>;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};
defaultComponent: D;
}
Expand Down
Loading

0 comments on commit 3d26ec2

Please sign in to comment.