File tree Expand file tree Collapse file tree
src/molecules/Button/IconButton Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @equinor/amplify-component-lib" ,
3- "version" : " 13.1.1 " ,
3+ "version" : " 13.1.2 " ,
44 "description" : " Frontend Typescript components for the Amplify team" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change 11import { FC , ReactNode } from 'react' ;
22
3- import { Icon } from '@equinor/eds-core-react' ;
3+ import { Icon , IconProps } from '@equinor/eds-core-react' ;
44import { CircularProgressProps } from '@equinor/eds-core-react' ;
55import { IconData } from '@equinor/eds-icons' ;
66import type {
@@ -21,6 +21,7 @@ type Shape = 'circular' | 'square';
2121
2222type BaseIconButtonProps = {
2323 icon : IconData ;
24+ iconProps ?: Omit < IconProps , 'data' > ;
2425 shape ?: Shape ;
2526 children ?: never ;
2627} & Omit < CommonButtonProps , 'children' > ;
@@ -32,6 +33,7 @@ const BaseIconButton: FC<BaseIconButtonProps> = ({
3233 loading = false ,
3334 shape = 'circular' ,
3435 onClick,
36+ iconProps,
3537 ...rest
3638} ) => {
3739 const tokens = TOKEN_MAPPINGS [ color ] [ variant ] ;
@@ -62,7 +64,7 @@ const BaseIconButton: FC<BaseIconButtonProps> = ({
6264 />
6365 </ >
6466 ) : (
65- < Icon data = { icon } />
67+ < Icon data = { icon } { ... iconProps } />
6668 ) }
6769 </ IconButtonWrapper >
6870 ) ;
You can’t perform that action at this time.
0 commit comments