@@ -6,6 +6,7 @@ export enum IconButtonVariant {
66  Simple , 
77  Outline , 
88  Fill , 
9+   Colored , 
910} 
1011
1112type  ColorProp  =  keyof  DefaultTheme [ 'colors' ]  |  'inherit' ; 
@@ -75,7 +76,7 @@ const IconButtonBase = styled.button<BaseProps>`
7576  cursor: pointer; 
7677  display: inline-grid; 
7778  place-items: center; 
78-   transition:  ${ ( )   =>   transition ( 'background-color' ,  'color' ,  'box-shadow' ) }  ; 
79+   ${ transition ( 'background-color' ,  'color' ,  'box-shadow'  ,   'filter ') }  ; 
7980  color: ${ p  =>  p . theme . colors . text }  ; 
8081  font-size: ${ p  =>  p . size  ??  '1em' }  ; 
8182  border: none; 
@@ -143,8 +144,22 @@ const FillIconButton = styled(IconButtonBase)<ButtonStyleProps>`
143144  } 
144145` ; 
145146
147+ const  ColoredIconButton  =  styled ( IconButtonBase ) < ButtonStyleProps > ` 
148+   color: white; 
149+   background-color: ${ p  =>  
150+     p . color  ===  'inherit'  ? 'inherit'  : p . theme . colors [ p . color ] }  ;
151+   border-radius: 50%; 
152+   &:hover, 
153+   &:focus { 
154+     color: white; 
155+     filter: brightness(1.3); 
156+     box-shadow: ${ p  =>  p . theme . boxShadowSoft }  ; 
157+   } 
158+ ` ; 
159+ 
146160const  ComponentMap  =  new  Map ( [ 
147161  [ IconButtonVariant . Simple ,  SimpleIconButton ] , 
148162  [ IconButtonVariant . Outline ,  OutlineIconButton ] , 
149163  [ IconButtonVariant . Fill ,  FillIconButton ] , 
164+   [ IconButtonVariant . Colored ,  ColoredIconButton ] , 
150165] ) ; 
0 commit comments