Skip to content

Commit

Permalink
fix: added href to iconButton (carbon-design-system#18283)
Browse files Browse the repository at this point in the history
* fix: added href to iconButton

* fix: updated snapshots

* fix: comment

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

---------

Co-authored-by: Gururaj J <[email protected]>
Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
3 people authored Jan 6, 2025
1 parent 51edaf1 commit 424f22e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4226,6 +4226,9 @@ Map {
"enterDelayMs": Object {
"type": "number",
},
"href": Object {
"type": "string",
},
"isSelected": Object {
"type": "bool",
},
Expand Down
10 changes: 10 additions & 0 deletions packages/react/src/components/IconButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ interface IconButtonProps
*/
autoAlign?: boolean;

/**
* Optionally specify an href for your IconButton to become an `<a>` element
*/
href?: string;

/**
* Provide an icon or asset to be rendered inside of the IconButton
*/
Expand Down Expand Up @@ -253,6 +258,11 @@ IconButton.propTypes = {
*/
autoAlign: PropTypes.bool,

/**
* Optionally specify an href for your IconButton to become an `<a>` element
*/
href: PropTypes.string,

/**
* Provide an icon or asset to be rendered inside of the IconButton
*/
Expand Down

0 comments on commit 424f22e

Please sign in to comment.