File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/Shared/Components/Button Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,11 @@ const ButtonElement = ({
114
114
* ```tsx
115
115
* <Button component={ButtonComponentType.link} linkProps={{ to: '#' }} />
116
116
* ```
117
+ *
118
+ * @example Icon button
119
+ * ```tsx
120
+ * <Button icon={<ICCube />} ariaLabel="Label" />
121
+ * ```
117
122
*/
118
123
const Button = ( {
119
124
dataTestId,
Original file line number Diff line number Diff line change @@ -119,7 +119,14 @@ export type ButtonProps = (
119
119
endIcon ?: ReactElement
120
120
}
121
121
| {
122
+ /**
123
+ * If provided, icon button is rendered
124
+ */
122
125
icon : ReactElement
126
+ /**
127
+ * Label for the icon button for accessibility.
128
+ * Shown on hover in tooltip if tippy is not provided explicitly
129
+ */
123
130
ariaLabel : string
124
131
text ?: never
125
132
startIcon ?: never
You can’t perform that action at this time.
0 commit comments