-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Better distinction between the private and public components
- Loading branch information
1 parent
e85802d
commit 221edb1
Showing
13 changed files
with
119 additions
and
23 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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import withRoot from 'docs/src/modules/components/withRoot'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import markdown from './switch-base.md'; | ||
|
||
function Page() { | ||
return <MarkdownDocs markdown={markdown} />; | ||
} | ||
|
||
export default withRoot(Page); |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
filename: /packages/material-ui/src/internal/SwitchBase.js | ||
--- | ||
|
||
<!--- This documentation is automatically generated, do not try to edit it. --> | ||
|
||
# SwitchBase | ||
|
||
|
||
|
||
## Props | ||
|
||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| <span class="prop-name">checked</span> | <span class="prop-type">union: bool |<br> string<br> | | If `true`, the component is checked. | | ||
| <span class="prop-name required">checkedIcon *</span> | <span class="prop-type">node | | The icon to display when the component is checked. | | ||
| <span class="prop-name">classes</span> | <span class="prop-type">object | | Useful to extend the style applied to components. | | ||
| <span class="prop-name">disabled</span> | <span class="prop-type">bool | | If `true`, the switch will be disabled. | | ||
| <span class="prop-name">disableRipple</span> | <span class="prop-type">bool | | If `true`, the ripple effect will be disabled. | | ||
| <span class="prop-name required">icon *</span> | <span class="prop-type">node | | The icon to display when the component is unchecked. | | ||
| <span class="prop-name">id</span> | <span class="prop-type">string | | The id of the `input` element. | | ||
| <span class="prop-name">indeterminate</span> | <span class="prop-type">bool | | If `true`, the component appears indeterminate. | | ||
| <span class="prop-name">indeterminateIcon</span> | <span class="prop-type">node | | The icon to display when the component is indeterminate. | | ||
| <span class="prop-name">inputProps</span> | <span class="prop-type">object | | Properties applied to the `input` element. | | ||
| <span class="prop-name">inputRef</span> | <span class="prop-type">func | | Use that property to pass a ref callback to the native input component. | | ||
| <span class="prop-name">name</span> | <span class="prop-type">string | | | | ||
| <span class="prop-name">onChange</span> | <span class="prop-type">func | | Callback fired when the state is changed.<br><br>**Signature:**<br>`function(event: object, checked: boolean) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.checked`.<br>*checked:* The `checked` value of the switch | | ||
| <span class="prop-name">type</span> | <span class="prop-type">string | <span class="prop-default">'checkbox'</span> | The input component property `type`. | | ||
| <span class="prop-name">value</span> | <span class="prop-type">string | | The value of the component. | | ||
|
||
Any other properties supplied will be [spread to the root element](/guides/api#spread). | ||
|
||
## CSS API | ||
|
||
You can override all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `root` | ||
- `checked` | ||
- `disabled` | ||
- `input` | ||
|
||
Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section | ||
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/v1-beta/packages/material-ui/src/internal/SwitchBase.js) | ||
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: `MuiSwitchBase`. | ||
|
||
## Inheritance | ||
|
||
The properties of the [IconButton](/api/icon-button) component are also available. | ||
|
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import withRoot from 'docs/src/modules/components/withRoot'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import markdown from './touch-ripple.md'; | ||
|
||
function Page() { | ||
return <MarkdownDocs markdown={markdown} />; | ||
} | ||
|
||
export default withRoot(Page); |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
filename: /packages/material-ui/src/ButtonBase/TouchRipple.js | ||
--- | ||
|
||
<!--- This documentation is automatically generated, do not try to edit it. --> | ||
|
||
# TouchRipple | ||
|
||
|
||
|
||
## Props | ||
|
||
| Name | Type | Default | Description | | ||
|:-----|:-----|:--------|:------------| | ||
| <span class="prop-name">center</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | If `true`, the ripple starts at the center of the component rather than at the point of interaction. | | ||
| <span class="prop-name">classes</span> | <span class="prop-type">object | | Useful to extend the style applied to components. | | ||
|
||
Any other properties supplied will be [spread to the root element](/guides/api#spread). | ||
|
||
## CSS API | ||
|
||
You can override all the class names injected by Material-UI thanks to the `classes` property. | ||
This property accepts the following keys: | ||
- `root` | ||
- `ripple` | ||
- `rippleVisible` | ||
- `ripplePulsate` | ||
- `child` | ||
- `childLeaving` | ||
- `childPulsate` | ||
|
||
Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section | ||
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/v1-beta/packages/material-ui/src/ButtonBase/TouchRipple.js) | ||
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: `MuiTouchRipple`. | ||
|