Skip to content

Commit 68a9f53

Browse files
authored
Adds 'as' and 'href' to Button+IconButton prop docs (#6361)
1 parent 602b29a commit 68a9f53

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

packages/react/src/Button/Button.docs.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@
9595
"type": "React.ElementType",
9696
"defaultValue": "'button'"
9797
},
98+
{
99+
"name": "href",
100+
"type": "string",
101+
"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."
102+
},
98103
{
99104
"name": "block",
100105
"type": "boolean",
@@ -190,4 +195,4 @@
190195
"element": "button",
191196
"url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attributes"
192197
}
193-
}
198+
}

packages/react/src/Button/IconButton.docs.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@
6262
"required": true,
6363
"description": "This will be the Button description."
6464
},
65+
{
66+
"name": "as",
67+
"type": "React.ElementType",
68+
"defaultValue": "'button'"
69+
},
70+
{
71+
"name": "href",
72+
"type": "string",
73+
"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."
74+
},
6575
{
6676
"name": "variant",
6777
"type": "'default' | 'primary' | 'danger' | 'invisible' | 'link'",
@@ -124,4 +134,4 @@
124134
}
125135
],
126136
"subcomponents": []
127-
}
137+
}

0 commit comments

Comments
 (0)