You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The types for IconButton (IconButtonProps) do not include href. However, the types for Button (ButtonProps which use ButtonBaseProps) do include an href.
Type '{ children: Element; id: string; label: string; href: string; target: string; rel: string; }' is not assignable to type 'IntrinsicAttributes & IconButtonProps & RefAttributes<unknown>'.
Property 'href' does not exist on type 'IntrinsicAttributes & IconButtonProps & RefAttributes<unknown>'. Did you mean 'ref'?
Button accepts href. IconButton does not. They both should.
Suggested Severity
Severity 4 = Unrelated to a user task, has a workaround or does not need a workaround.
Package
@carbon/react
Browser
No response
Package version
1.67.1
React version
No response
Description
The types for
IconButton
(IconButtonProps
) do not includehref
. However, the types forButton
(ButtonProps
which useButtonBaseProps
) do include anhref
.Reproduction/example
https://stackblitz.com/edit/github-azd4us?file=src%2FApp.tsx
Steps to reproduce
Paste the following code in an IDE with support for TypeScript (e.g., VS Code):
See the following error:
Button
acceptshref
.IconButton
does not. They both should.Suggested Severity
Severity 4 = Unrelated to a user task, has a workaround or does not need a workaround.
Application/PAL
DataPower
Code of Conduct
The text was updated successfully, but these errors were encountered: