From 8928acc38fa32e5d752c57cb80070e5368c66314 Mon Sep 17 00:00:00 2001 From: Josh Black Date: Tue, 12 Sep 2023 10:16:48 -0500 Subject: [PATCH] feat(IconButton): add default type to IconButton (#3732) * feat(IconButton): add default type to IconButton * Create wild-snakes-talk.md --- .changeset/wild-snakes-talk.md | 7 +++++++ src/Button/IconButton.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/wild-snakes-talk.md diff --git a/.changeset/wild-snakes-talk.md b/.changeset/wild-snakes-talk.md new file mode 100644 index 00000000000..ab0f4650dba --- /dev/null +++ b/.changeset/wild-snakes-talk.md @@ -0,0 +1,7 @@ +--- +"@primer/react": minor +--- + +Add default `type="button"` to `IconButton` component + + diff --git a/src/Button/IconButton.tsx b/src/Button/IconButton.tsx index 4a76d45a19b..e313aa1a4e7 100644 --- a/src/Button/IconButton.tsx +++ b/src/Button/IconButton.tsx @@ -16,7 +16,7 @@ const IconButton = forwardRef(({sx: sxProp = defaultSxProp, icon: Icon, ...props return ( // @ts-expect-error StyledButton wants both Anchor and Button refs - + ) }) as PolymorphicForwardRefComponent<'button' | 'a', IconButtonProps>