169 lines
5.8 KiB
JSON
169 lines
5.8 KiB
JSON
|
|
{
|
||
|
|
"props": {
|
||
|
|
"checked": { "type": { "name": "bool" } },
|
||
|
|
"checkedIcon": { "type": { "name": "node" } },
|
||
|
|
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
|
||
|
|
"color": {
|
||
|
|
"type": {
|
||
|
|
"name": "union",
|
||
|
|
"description": "'default'<br>| 'primary'<br>| 'secondary'<br>| 'error'<br>| 'info'<br>| 'success'<br>| 'warning'<br>| string"
|
||
|
|
},
|
||
|
|
"default": "'primary'"
|
||
|
|
},
|
||
|
|
"defaultChecked": { "type": { "name": "bool" } },
|
||
|
|
"disabled": { "type": { "name": "bool" } },
|
||
|
|
"disableRipple": { "type": { "name": "bool" }, "default": "false" },
|
||
|
|
"edge": {
|
||
|
|
"type": {
|
||
|
|
"name": "enum",
|
||
|
|
"description": "'end'<br>| 'start'<br>| false"
|
||
|
|
},
|
||
|
|
"default": "false"
|
||
|
|
},
|
||
|
|
"icon": { "type": { "name": "node" } },
|
||
|
|
"id": { "type": { "name": "string" } },
|
||
|
|
"inputProps": {
|
||
|
|
"type": { "name": "object" },
|
||
|
|
"deprecated": true,
|
||
|
|
"deprecationInfo": "Use <code>slotProps.input</code> instead. This prop will be removed in a future major release. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
|
||
|
|
},
|
||
|
|
"inputRef": {
|
||
|
|
"type": { "name": "custom", "description": "ref" },
|
||
|
|
"deprecated": true,
|
||
|
|
"deprecationInfo": "Use <code>slotProps.input.ref</code> instead. This prop will be removed in a future major release. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
|
||
|
|
},
|
||
|
|
"onChange": {
|
||
|
|
"type": { "name": "func" },
|
||
|
|
"signature": {
|
||
|
|
"type": "function(event: React.ChangeEvent<HTMLInputElement>) => void",
|
||
|
|
"describedArgs": ["event"]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"required": { "type": { "name": "bool" }, "default": "false" },
|
||
|
|
"size": {
|
||
|
|
"type": {
|
||
|
|
"name": "union",
|
||
|
|
"description": "'medium'<br>| 'small'<br>| string"
|
||
|
|
},
|
||
|
|
"default": "'medium'"
|
||
|
|
},
|
||
|
|
"slotProps": {
|
||
|
|
"type": {
|
||
|
|
"name": "shape",
|
||
|
|
"description": "{ input?: func<br>| object, root?: func<br>| object, switchBase?: func<br>| object, thumb?: func<br>| object, track?: func<br>| object }"
|
||
|
|
},
|
||
|
|
"default": "{}"
|
||
|
|
},
|
||
|
|
"slots": {
|
||
|
|
"type": {
|
||
|
|
"name": "shape",
|
||
|
|
"description": "{ input?: elementType, root?: elementType, switchBase?: elementType, thumb?: elementType, track?: elementType }"
|
||
|
|
},
|
||
|
|
"default": "{}"
|
||
|
|
},
|
||
|
|
"sx": {
|
||
|
|
"type": {
|
||
|
|
"name": "union",
|
||
|
|
"description": "Array<func<br>| object<br>| bool><br>| func<br>| object"
|
||
|
|
},
|
||
|
|
"additionalInfo": { "sx": true }
|
||
|
|
},
|
||
|
|
"value": { "type": { "name": "any" } }
|
||
|
|
},
|
||
|
|
"name": "Switch",
|
||
|
|
"imports": [
|
||
|
|
"import Switch from '@mui/material/Switch';",
|
||
|
|
"import { Switch } from '@mui/material';"
|
||
|
|
],
|
||
|
|
"slots": [
|
||
|
|
{
|
||
|
|
"name": "root",
|
||
|
|
"description": "The component that renders the root slot.",
|
||
|
|
"default": "'span'",
|
||
|
|
"class": "MuiSwitch-root"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "track",
|
||
|
|
"description": "The component that renders the track slot.",
|
||
|
|
"default": "'span'",
|
||
|
|
"class": "MuiSwitch-track"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "thumb",
|
||
|
|
"description": "The component that renders the thumb slot.",
|
||
|
|
"default": "'span'",
|
||
|
|
"class": "MuiSwitch-thumb"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "switchBase",
|
||
|
|
"description": "The component that renders the switchBase slot.",
|
||
|
|
"default": "SwitchBase",
|
||
|
|
"class": "MuiSwitch-switchBase"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"name": "input",
|
||
|
|
"description": "The component that renders the switchBase's input slot.",
|
||
|
|
"default": "SwitchBaseInput",
|
||
|
|
"class": "MuiSwitch-input"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"classes": [
|
||
|
|
{
|
||
|
|
"key": "checked",
|
||
|
|
"className": "Mui-checked",
|
||
|
|
"description": "State class applied to the internal `SwitchBase` component's `checked` class.",
|
||
|
|
"isGlobal": true
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "colorPrimary",
|
||
|
|
"className": "MuiSwitch-colorPrimary",
|
||
|
|
"description": "Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`.",
|
||
|
|
"isGlobal": false
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "colorSecondary",
|
||
|
|
"className": "MuiSwitch-colorSecondary",
|
||
|
|
"description": "Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`.",
|
||
|
|
"isGlobal": false
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "disabled",
|
||
|
|
"className": "Mui-disabled",
|
||
|
|
"description": "State class applied to the internal SwitchBase component's disabled class.",
|
||
|
|
"isGlobal": true
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "edgeEnd",
|
||
|
|
"className": "MuiSwitch-edgeEnd",
|
||
|
|
"description": "Styles applied to the root element if `edge=\"end\"`.",
|
||
|
|
"isGlobal": false
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "edgeStart",
|
||
|
|
"className": "MuiSwitch-edgeStart",
|
||
|
|
"description": "Styles applied to the root element if `edge=\"start\"`.",
|
||
|
|
"isGlobal": false
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "sizeMedium",
|
||
|
|
"className": "MuiSwitch-sizeMedium",
|
||
|
|
"description": "Styles applied to the root element if `size=\"medium\"`.",
|
||
|
|
"isGlobal": false
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"key": "sizeSmall",
|
||
|
|
"className": "MuiSwitch-sizeSmall",
|
||
|
|
"description": "Styles applied to the root element if `size=\"small\"`.",
|
||
|
|
"isGlobal": false
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"spread": true,
|
||
|
|
"themeDefaultProps": false,
|
||
|
|
"muiName": "MuiSwitch",
|
||
|
|
"forwardsRefTo": "HTMLSpanElement",
|
||
|
|
"filename": "/packages/mui-material/src/Switch/Switch.js",
|
||
|
|
"inheritance": { "component": "IconButton", "pathname": "/material-ui/api/icon-button/" },
|
||
|
|
"demos": "<ul><li><a href=\"/material-ui/react-switch/\">Switch</a></li>\n<li><a href=\"/material-ui/react-transfer-list/\">Transfer List</a></li></ul>",
|
||
|
|
"cssComponent": false
|
||
|
|
}
|