forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propose the following improvments: - allow all the classnames to be extended with the classes property - remove the duplication between the theme and the styleManager
- Loading branch information
1 parent
5760009
commit b6c6bea
Showing
160 changed files
with
1,490 additions
and
590 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
AppBar | ||
====== | ||
# AppBar | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| accent | bool | false | If `true`, the AppBar will use the theme's accent color. | | ||
| children | node | | The content of the component. | | ||
| className | string | | The CSS class name of the root element. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `appBar` | ||
- `primary` | ||
- `accent` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiAppBar`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
Avatar | ||
====== | ||
# Avatar | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| alt | string | '' | Used in combination with `src` or `srcSet` to provide an alt attribute for the rendered `img` element. | | ||
| children | node | | Used to render icon or text elements inside the Avatar. `src` and `alt` props will not be used and no `img` will be rendered by default.<br>This can be an element, or just a string. | | ||
| className | string | | The CSS class name of the root element. | | ||
| component | union: string<br> func<br> | 'div' | The component used for the root node. Either a string to use a DOM element or a component. | | ||
| sizes | string | | The `sizes` attribute for the `img` element. | | ||
| src | string | | The `src` attribute for the `img` element. | | ||
| srcSet | string | | The `srcSet` attribute for the `img` element. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `root` | ||
- `defaultColor` | ||
- `img` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiAvatar`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
Badge | ||
===== | ||
# Badge | ||
|
||
```jsx | ||
<Badge badgeContent={4}> | ||
<Icon>folder</Icon> | ||
</Badge> | ||
``` | ||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| accent | bool | false | If `true`, the badge will use the accent badge colors. | | ||
| badgeClassName | string | | The CSS class name of the badge element. | | ||
| <span style="color: #31a148">badgeContent *</span> | node | | The content rendered within the badge. | | ||
| <span style="color: #31a148">children *</span> | node | | The badge will be added relative to this node. | | ||
| className | string | | The CSS class name of the root element. | | ||
| primary | bool | false | If `true`, the badge will use the primary badge colors. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `root` | ||
- `badge` | ||
- `primary` | ||
- `accent` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiBadge`. |
20 changes: 14 additions & 6 deletions
20
docs/src/pages/component-api/BottomNavigation/BottomNavigation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
BottomNavigation | ||
================ | ||
# BottomNavigation | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| <span style="color: #31a148">children *</span> | node | | The content of the component. | | ||
| className | string | | The CSS class name of the root element. | | ||
| index | number | | The index of the currently selected `BottomNavigationButton`. | | ||
| onChange | function | | Function called when the index changes. | | ||
| showLabels | bool | false | If `true`, all `BottomNavigationButton`s will show their labels. By default only the selected `BottomNavigationButton` will show its label. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `root` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiBottomNavigation`. |
26 changes: 20 additions & 6 deletions
26
docs/src/pages/component-api/BottomNavigation/BottomNavigationButton.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
BottomNavigationButton | ||
====================== | ||
# BottomNavigationButton | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| className | string | | The CSS class name of the root element. | | ||
| icon | node | | The icon element. If a string is provided, it will be used as a font ligature. | | ||
| label | node | | The label element. | | ||
| showLabel | bool | | If `true`, the BottomNavigationButton will show its label. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `root` | ||
- `selected` | ||
- `selectedIconOnly` | ||
- `label` | ||
- `selectedLabel` | ||
- `hiddenLabel` | ||
- `icon` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiBottomNavigationButton`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
Card | ||
==== | ||
# Card | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| className | string | | The CSS class name of the root element. | | ||
| raised | bool | false | If `true`, the card will use raised styling. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `card` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiCard`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
CardActions | ||
=========== | ||
# CardActions | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| children | node | | The content of the component. | | ||
| className | string | | The CSS class name of the root element. | | ||
| disableActionSpacing | bool | false | If `true`, the card actions do not have additional margin. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `cardActions` | ||
- `actionSpacing` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiCardActions`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
CardContent | ||
=========== | ||
# CardContent | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| className | string | | The CSS class name of the root element. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `cardContent` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiCardContent`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
CardHeader | ||
========== | ||
# CardHeader | ||
|
||
|
||
|
||
Props | ||
----- | ||
|
||
## Props | ||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| avatar | node | | The Avatar for the Card Header. | | ||
| className | string | | The CSS class name of the root element. | | ||
| subheader | node | | The content of the component. | | ||
| title | node | | The content of the Card Title. | | ||
|
||
Any other properties supplied will be spread to the root element. | ||
## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `cardHeader` | ||
- `avatar` | ||
- `content` | ||
|
||
Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names) | ||
section for more detail. | ||
|
||
If using the `overrides` key of the theme as documented | ||
[here](/customization/themes#customizing-all-instances-of-a-component-type), | ||
you need to use the following style sheet name: `MuiCardHeader`. |
Oops, something went wrong.