File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,13 +104,18 @@ export const Button = ({
104104
105105 const ButtonType = restProps . href ? BlueprintAnchorButton : BlueprintButton ;
106106
107+ const iconSize = {
108+ small : restProps [ "size" ] === "small" ,
109+ large : restProps [ "size" ] === "large" ,
110+ } ;
111+
107112 const button = (
108113 < ButtonType
109114 { ...restProps }
110115 className = { `${ eccgui } -button ` + className }
111116 intent = { ( intent || intentByFunction ) as BlueprintIntent }
112- icon = { typeof icon === "string" ? < Icon name = { icon } /> : icon }
113- rightIcon = { typeof rightIcon === "string" ? < Icon name = { rightIcon } /> : rightIcon }
117+ icon = { typeof icon === "string" ? < Icon name = { icon } { ... iconSize } /> : icon }
118+ rightIcon = { typeof rightIcon === "string" ? < Icon name = { rightIcon } { ... iconSize } /> : rightIcon }
114119 >
115120 { children }
116121 { badge && (
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ export const IconButton = ({
5454 swapPlaceholderDelay : 10 ,
5555 } ;
5656 const iconProps = {
57- small : restProps . small ,
58- large : restProps . large ,
57+ small : restProps . small || restProps [ "size" ] === "small" ,
58+ large : restProps . large || restProps [ "size" ] === "large" ,
5959 tooltipText : tooltipAsTitle ? undefined : text ,
6060 tooltipProps : tooltipProps
6161 ? {
You can’t perform that action at this time.
0 commit comments