Skip to content

Commit 424f22e

Browse files
riddhybansalGururajj77tay1orjones
authored
fix: added href to iconButton (#18283)
* fix: added href to iconButton * fix: updated snapshots * fix: comment * Update packages/react/src/components/IconButton/index.tsx --------- Co-authored-by: Gururaj J <89023023+Gururajj77@users.noreply.github.com> Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
1 parent 51edaf1 commit 424f22e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4226,6 +4226,9 @@ Map {
42264226
"enterDelayMs": Object {
42274227
"type": "number",
42284228
},
4229+
"href": Object {
4230+
"type": "string",
4231+
},
42294232
"isSelected": Object {
42304233
"type": "bool",
42314234
},

packages/react/src/components/IconButton/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ interface IconButtonProps
7777
*/
7878
autoAlign?: boolean;
7979

80+
/**
81+
* Optionally specify an href for your IconButton to become an `<a>` element
82+
*/
83+
href?: string;
84+
8085
/**
8186
* Provide an icon or asset to be rendered inside of the IconButton
8287
*/
@@ -253,6 +258,11 @@ IconButton.propTypes = {
253258
*/
254259
autoAlign: PropTypes.bool,
255260

261+
/**
262+
* Optionally specify an href for your IconButton to become an `<a>` element
263+
*/
264+
href: PropTypes.string,
265+
256266
/**
257267
* Provide an icon or asset to be rendered inside of the IconButton
258268
*/

0 commit comments

Comments
 (0)