Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/react/src/Button/Button.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
"type": "React.ElementType",
"defaultValue": "'button'"
},
{
"name": "href",
"type": "string",
"description": "**May only be used when `as` is set to 'a'**.\n The URL the button links to. If `as` is set to 'a', this prop is required."
},
{
"name": "block",
"type": "boolean",
Expand Down Expand Up @@ -190,4 +195,4 @@
"element": "button",
"url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attributes"
}
}
}
12 changes: 11 additions & 1 deletion packages/react/src/Button/IconButton.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@
"required": true,
"description": "This will be the Button description."
},
{
"name": "as",
"type": "React.ElementType",
"defaultValue": "'button'"
Copy link
Preview

Copilot AI Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a description for the 'as' prop to explain its purpose, similar to how other props in the documentation include descriptions.

Suggested change
"defaultValue": "'button'"
"defaultValue": "'button'",
"description": "Specifies the HTML element or custom component to render. For example, set `as` to 'a' to render an anchor tag instead of a button."

Copilot uses AI. Check for mistakes.

},
{
"name": "href",
"type": "string",
"description": "**May only be used when `as` is set to 'a'**.\n The URL the button links to. If `as` is set to 'a', this prop is required."
},
{
"name": "variant",
"type": "'default' | 'primary' | 'danger' | 'invisible' | 'link'",
Expand Down Expand Up @@ -124,4 +134,4 @@
}
],
"subcomponents": []
}
}
Loading