Skip to content

Commit

Permalink
Fix proptypes and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Nov 21, 2024
1 parent a5d1b64 commit 31833d5
Show file tree
Hide file tree
Showing 18 changed files with 106 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/data/api/meter-indicator.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"themeDefaultProps": true,
"muiName": "MeterIndicator",
"forwardsRefTo": "HTMLSpanElement",
"filename": "/packages/mui-base/src/Meter/Indicator/MeterIndicator.tsx",
"filename": "/packages/react/src/Meter/Indicator/MeterIndicator.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/components/react-meter/\">Meter</a></li></ul>",
"cssComponent": false
Expand Down
2 changes: 1 addition & 1 deletion docs/data/api/meter-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"themeDefaultProps": true,
"muiName": "MeterRoot",
"forwardsRefTo": "HTMLDivElement",
"filename": "/packages/mui-base/src/Meter/Root/MeterRoot.tsx",
"filename": "/packages/react/src/Meter/Root/MeterRoot.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/components/react-meter/\">Meter</a></li></ul>",
"cssComponent": false
Expand Down
2 changes: 1 addition & 1 deletion docs/data/api/meter-track.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"themeDefaultProps": true,
"muiName": "MeterTrack",
"forwardsRefTo": "HTMLSpanElement",
"filename": "/packages/mui-base/src/Meter/Track/MeterTrack.tsx",
"filename": "/packages/react/src/Meter/Track/MeterTrack.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/components/react-meter/\">Meter</a></li></ul>",
"cssComponent": false
Expand Down
14 changes: 14 additions & 0 deletions docs/reference/generated/meter-indicator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "MeterIndicator",
"description": "",
"props": {
"className": {
"type": "string | (state) => string",
"description": "Class names applied to the element or a function that returns them based on the component's state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"description": "A function to customize rendering of the component."
}
}
}
69 changes: 69 additions & 0 deletions docs/reference/generated/meter-root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "MeterRoot",
"description": "",
"props": {
"value": {
"type": "number",
"required": true,
"description": "The current value."
},
"aria-label": {
"type": "string",
"description": "The label for the Indicator component."
},
"aria-labelledby": {
"type": "string",
"description": "An id or space-separated list of ids of elements that label the Indicator component."
},
"aria-valuetext": {
"type": "string",
"description": "A string value that provides a human-readable text alternative for the current value of the meter indicator."
},
"className": {
"type": "string | (state) => string",
"description": "Class names applied to the element or a function that returns them based on the component's state."
},
"direction": {
"type": "'ltr' | 'rtl'",
"default": "'ltr'",
"description": "The direction that the meter fills towards"
},
"getAriaLabel": {
"type": "function(value: number) => string",
"description": "Accepts a function which returns a string value that provides an accessible name for the Indicator component"
},
"getAriaValueText": {
"type": "function(value: number) => string",
"description": "Accepts a function which returns a string value that provides a human-readable text alternative for the current value of the meter indicator."
},
"high": {
"type": "number",
"default": "100",
"description": "Sets the lower boundary of the high end of the numeric range represented by the component.\nIf unspecified, or greater than `max`, it will fall back to `max`."
},
"low": {
"type": "number",
"default": "0",
"description": "Sets the upper boundary of the low end of the numeric range represented by the component.\nIf unspecified, or less than `min`, it will fall back to `min`."
},
"max": {
"type": "number",
"default": "100",
"description": "The maximum value"
},
"min": {
"type": "number",
"default": "0",
"description": "The minimum value"
},
"optimum": {
"type": "number",
"default": "50",
"description": "Indicates the optimal point in the numeric range represented by the component.\nIf unspecified, it will fall back to the midpoint between `min` and `max`."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"description": "A function to customize rendering of the component."
}
}
}
14 changes: 14 additions & 0 deletions docs/reference/generated/meter-track.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "MeterTrack",
"description": "",
"props": {
"className": {
"type": "string | (state) => string",
"description": "Class names applied to the element or a function that returns them based on the component's state."
},
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"description": "A function to customize rendering of the component."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { BaseUIComponentProps } from '../../utils/types';
*
* Demos:
*
* - [Meter](https://base-ui.netlify.app/components/react-meter/)
* - [Meter](https://base-ui.com/components/react-meter/)
*
* API:
*
* - [MeterIndicator API](https://base-ui.netlify.app/components/react-meter/#api-reference-MeterIndicator)
* - [MeterIndicator API](https://base-ui.com/components/react-meter/#api-reference-MeterIndicator)
*/
const MeterIndicator = React.forwardRef(function MeterIndicator(
props: MeterIndicator.Props,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { meterStyleHookMapping } from './styleHooks';
*
* Demos:
*
* - [Meter](https://base-ui.netlify.app/components/react-meter/)
* - [Meter](https://base-ui.com/components/react-meter/)
*
* API:
*
* - [MeterRoot API](https://base-ui.netlify.app/components/react-meter/#api-reference-MeterRoot)
* - [MeterRoot API](https://base-ui.com/components/react-meter/#api-reference-MeterRoot)
*/
const MeterRoot = React.forwardRef(function MeterRoot(
props: MeterRoot.Props,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import { BaseUIComponentProps } from '../../utils/types';
*
* Demos:
*
* - [Meter](https://base-ui.netlify.app/components/react-meter/)
* - [Meter](https://base-ui.com/components/react-meter/)
*
* API:
*
* - [MeterTrack API](https://base-ui.netlify.app/components/react-meter/#api-reference-MeterTrack)
* - [MeterTrack API](https://base-ui.com/components/react-meter/#api-reference-MeterTrack)
*/
const MeterTrack = React.forwardRef(function MeterTrack(
props: MeterTrack.Props,
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 31833d5

Please sign in to comment.