Skip to content

Commit

Permalink
fix(button): do not make the icon responsive in icon only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
clementprevot committed Oct 4, 2024
1 parent 65e6061 commit 40a731f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/fractal/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,15 @@ export const Button = forwardRef<HTMLElement, ButtonProps>(
: '',
!inlineStyle && isTextVariant ? 'mt-0' : '',
iconResponsive === false ? 'flex' : 'hidden',
iconResponsive === Breakpoints.xxs || iconResponsive === true
!iconOnly &&
(iconResponsive === Breakpoints.xxs || iconResponsive === true)
? 'xs:flex'
: '',
iconResponsive === Breakpoints.xs ? 'sm:flex' : '',
iconResponsive === Breakpoints.sm ? 'md:flex' : '',
iconResponsive === Breakpoints.md ? 'lg:flex' : '',
iconResponsive === Breakpoints.lg ? 'xl:flex' : '',
iconResponsive === Breakpoints.xl ? 'xxl:flex' : '',
!iconOnly && iconResponsive === Breakpoints.xs ? 'sm:flex' : '',
!iconOnly && iconResponsive === Breakpoints.sm ? 'md:flex' : '',
!iconOnly && iconResponsive === Breakpoints.md ? 'lg:flex' : '',
!iconOnly && iconResponsive === Breakpoints.lg ? 'xl:flex' : '',
!iconOnly && iconResponsive === Breakpoints.xl ? 'xxl:flex' : '',
)}
style={
inlineStyle
Expand Down

0 comments on commit 40a731f

Please sign in to comment.