Skip to content

Commit

Permalink
Sort generated props json
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Dec 12, 2024
1 parent 9c6ddaf commit 6b009a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions docs/reference/generated/menu-radio-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
"name": "MenuRadioItem",
"description": "A menu item that works like a radio button in a given group.\nRenders a `<div>` element.",
"props": {
"value": {
"type": "any",
"required": true,
"description": "Value of the radio item.\nThis is the value that will be set in the MenuRadioGroup when the item is selected."
},
"closeOnClick": {
"type": "boolean",
"default": "true",
Expand All @@ -28,6 +23,11 @@
"onClick": {
"type": "(event) => void",
"description": "The click handler for the menu item."
},
"value": {
"type": "any",
"required": true,
"description": "Value of the radio item.\nThis is the value that will be set in the MenuRadioGroup when the item is selected."
}
},
"dataAttributes": {
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/generated/radio-root.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
"name": "RadioRoot",
"description": "Represents the radio button itself.\nRenders a `<button>` element and a hidden `<input>` beside.",
"props": {
"value": {
"type": "any",
"required": true,
"description": "The unique identifying value of the radio in a group."
},
"className": {
"type": "string | (state) => string",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
Expand All @@ -29,6 +24,11 @@
"type": "boolean",
"default": "false",
"description": "Whether the user must choose a value before submitting a form."
},
"value": {
"type": "any",
"required": true,
"description": "The unique identifying value of the radio in a group."
}
}
}
6 changes: 3 additions & 3 deletions docs/reference/generated/select-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "SelectValue",
"description": "A text label of the currently selected item.\nRenders a `<span>` element.",
"props": {
"children": {
"type": "React.ReactElement | (value) => React.ReactElement"
},
"className": {
"type": "string | (state) => string",
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."
Expand All @@ -13,9 +16,6 @@
"render": {
"type": "React.ReactElement | (props, state) => React.ReactElement",
"description": "Allows you to replace the component’s HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
},
"children": {
"type": "React.ReactElement | (value) => React.ReactElement"
}
}
}
2 changes: 1 addition & 1 deletion scripts/buildApiDocs/buildReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function buildReference() {
const json: ComponentDef = {
name: componentData.name,
description: descriptionData.componentDescription,
props,
props: Object.fromEntries(Object.entries(props).sort()),
dataAttributes,
cssVariables,
};
Expand Down

0 comments on commit 6b009a3

Please sign in to comment.