From 4febee3f08d194b9a381d91a9aba3ea77a43014f Mon Sep 17 00:00:00 2001 From: Alan Zou Date: Mon, 18 Apr 2022 17:42:18 +0800 Subject: [PATCH] feat(IconButton): [IconButton] support `IconProps` --- .../src/components/Buttons/IconButton/IconButton.tsx | 6 ++++++ sync-github.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/juno-core/src/components/Buttons/IconButton/IconButton.tsx b/packages/juno-core/src/components/Buttons/IconButton/IconButton.tsx index ac32e9a6..caeac830 100644 --- a/packages/juno-core/src/components/Buttons/IconButton/IconButton.tsx +++ b/packages/juno-core/src/components/Buttons/IconButton/IconButton.tsx @@ -62,6 +62,10 @@ type RcIconButtonProps = { * not have fake border on `inverse` and `contained` variant in `highContrast` theme */ disabledFakeBorder?: boolean; + /** + * pass props to below Icon component + */ + IconProps?: RcIconProps; } & RcIconButtonDeprecatedProps & Pick< RcIconProps, @@ -88,6 +92,7 @@ const _RcIconButton = memo( const { buttonRef = ref, + IconProps, className, classes: classesProp, children, @@ -157,6 +162,7 @@ const _RcIconButton = memo( className={classes!.icon} loading={loading} CircularProgressProps={CircularProgressProps} + {...IconProps} > {children as string} diff --git a/sync-github.json b/sync-github.json index 411d0122..4771b47f 100644 --- a/sync-github.json +++ b/sync-github.json @@ -1,3 +1,3 @@ { - "latestCommitSHA": "d9561d6cdc5ff8d26edcb053c188e27e94cf7ea5" + "latestCommitSHA": "beed4ca0fbb3ab2e51014fa129584ed085225613" } \ No newline at end of file