Files
react-test/docs/pages/material-ui/api/rating.json
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

190 lines
6.5 KiB
JSON

{
"props": {
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"component": { "type": { "name": "elementType" } },
"defaultValue": { "type": { "name": "number" }, "default": "null" },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"emptyIcon": { "type": { "name": "node" }, "default": "<StarBorder fontSize=\"inherit\" />" },
"emptyLabelText": { "type": { "name": "node" }, "default": "'Empty'" },
"getLabelText": {
"type": { "name": "func" },
"default": "function defaultLabelText(value) {\n return `${value || '0'} Star${value !== 1 ? 's' : ''}`;\n}",
"signature": { "type": "function(value: number) => string", "describedArgs": ["value"] }
},
"highlightSelectedOnly": { "type": { "name": "bool" }, "default": "false" },
"icon": { "type": { "name": "node" }, "default": "<Star fontSize=\"inherit\" />" },
"IconContainerComponent": {
"type": { "name": "elementType" },
"default": "function IconContainer(props) {\n const { value, ...other } = props;\n return <span {...other} />;\n}",
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.icon.component</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."
},
"max": { "type": { "name": "number" }, "default": "5" },
"name": { "type": { "name": "string" } },
"onChange": {
"type": { "name": "func" },
"signature": {
"type": "function(event: React.SyntheticEvent, value: number | null) => void",
"describedArgs": ["event", "value"]
}
},
"onChangeActive": {
"type": { "name": "func" },
"signature": {
"type": "function(event: React.SyntheticEvent, value: number) => void",
"describedArgs": ["event", "value"]
}
},
"precision": { "type": { "name": "custom", "description": "number" }, "default": "1" },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"size": {
"type": {
"name": "union",
"description": "'small'<br>&#124;&nbsp;'medium'<br>&#124;&nbsp;'large'<br>&#124;&nbsp;string"
},
"default": "'medium'"
},
"slotProps": {
"type": {
"name": "shape",
"description": "{ decimal?: func<br>&#124;&nbsp;object, icon?: func<br>&#124;&nbsp;object, label?: func<br>&#124;&nbsp;object, root?: func<br>&#124;&nbsp;object }"
},
"default": "{}"
},
"slots": {
"type": {
"name": "shape",
"description": "{ decimal?: elementType, icon?: elementType, label?: elementType, root?: elementType }"
},
"default": "{}"
},
"sx": {
"type": {
"name": "union",
"description": "Array&lt;func<br>&#124;&nbsp;object<br>&#124;&nbsp;bool&gt;<br>&#124;&nbsp;func<br>&#124;&nbsp;object"
},
"additionalInfo": { "sx": true }
},
"value": { "type": { "name": "number" } }
},
"name": "Rating",
"imports": [
"import Rating from '@mui/material/Rating';",
"import { Rating } from '@mui/material';"
],
"slots": [
{
"name": "root",
"description": "The component used for the root slot.",
"default": "'span'",
"class": "MuiRating-root"
},
{
"name": "label",
"description": "The component used for the label slot.",
"default": "'label'",
"class": "MuiRating-label"
},
{
"name": "icon",
"description": "The component used for the icon slot.",
"default": "'span'",
"class": "MuiRating-icon"
},
{
"name": "decimal",
"description": "The component used for the decimal slot.",
"default": "'span'",
"class": "MuiRating-decimal"
}
],
"classes": [
{
"key": "disabled",
"className": "Mui-disabled",
"description": "State class applied to the root element if `disabled={true}`.",
"isGlobal": true
},
{
"key": "focusVisible",
"className": "Mui-focusVisible",
"description": "State class applied to the root element if keyboard focused.",
"isGlobal": true
},
{
"key": "iconActive",
"className": "MuiRating-iconActive",
"description": "Styles applied to the icon wrapping elements when active.",
"isGlobal": false
},
{
"key": "iconEmpty",
"className": "MuiRating-iconEmpty",
"description": "Styles applied to the icon wrapping elements when empty.",
"isGlobal": false
},
{
"key": "iconFilled",
"className": "MuiRating-iconFilled",
"description": "Styles applied to the icon wrapping elements when filled.",
"isGlobal": false
},
{
"key": "iconFocus",
"className": "MuiRating-iconFocus",
"description": "Styles applied to the icon wrapping elements when focus.",
"isGlobal": false
},
{
"key": "iconHover",
"className": "MuiRating-iconHover",
"description": "Styles applied to the icon wrapping elements when hover.",
"isGlobal": false
},
{
"key": "labelEmptyValueActive",
"className": "MuiRating-labelEmptyValueActive",
"description": "Styles applied to the label of the \"no value\" input when it is active.",
"isGlobal": false
},
{
"key": "readOnly",
"className": "Mui-readOnly",
"description": "Styles applied to the root element if `readOnly={true}`.",
"isGlobal": true
},
{
"key": "sizeLarge",
"className": "MuiRating-sizeLarge",
"description": "Styles applied to the root element if `size=\"large\"`.",
"isGlobal": false
},
{
"key": "sizeMedium",
"className": "MuiRating-sizeMedium",
"description": "Styles applied to the root element if `size=\"medium\"`.",
"isGlobal": false
},
{
"key": "sizeSmall",
"className": "MuiRating-sizeSmall",
"description": "Styles applied to the root element if `size=\"small\"`.",
"isGlobal": false
},
{
"key": "visuallyHidden",
"className": "MuiRating-visuallyHidden",
"description": "Visually hide an element.",
"isGlobal": false
}
],
"spread": true,
"themeDefaultProps": true,
"muiName": "MuiRating",
"forwardsRefTo": "HTMLSpanElement",
"filename": "/packages/mui-material/src/Rating/Rating.js",
"inheritance": null,
"demos": "<ul><li><a href=\"/material-ui/react-rating/\">Rating</a></li></ul>",
"cssComponent": false
}