Skip to content

Commit 8974ef5

Browse files
committed
fix: allow to have given className in inline style mode
1 parent 740789a commit 8974ef5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/fractal/src/components/Button/Button.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ export const Button = forwardRef<HTMLElement, ButtonProps>(
336336
const isTextVariant = variant === Variants.Text
337337

338338
const classNames = inlineStyle
339-
? `${PREFIX}-${GROUP_NAME} ${PREFIX}-${GROUP_NAME}--${variant}${asLink ? ` ${PREFIX}-${GROUP_NAME}__link` : ''}`
339+
? cn(
340+
`${PREFIX}-${GROUP_NAME} ${PREFIX}-${GROUP_NAME}--${variant}${asLink ? ` ${PREFIX}-${GROUP_NAME}__link` : ''}`,
341+
props.className,
342+
)
340343
: cn(
341344
`${PREFIX}-${GROUP_NAME}`,
342345
`${PREFIX}-${GROUP_NAME}--${variant}`,

packages/fractal/src/components/Paper/Paper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const Paper = forwardRef<HTMLDivElement, PaperProps>(
155155
(theme === Themes.Light
156156
? 'bg-white text-dark'
157157
: 'bg-body-dark text-light'),
158-
!inlineStyle && props.className,
158+
props.className,
159159
)}
160160
element={element || 'div'}
161161
fullStyle={fullStyle}

packages/fractal/src/components/Typography/Typography.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ export const Typography = forwardRef<HTMLElement, TypographyProps>(
618618
`${PREFIX}-${GROUP_NAME}__${actualElement}`,
619619
`${PREFIX}-${GROUP_NAME}--${variant}`,
620620
!inlineStyle && typographyClassNames,
621-
!inlineStyle && props.className,
621+
props.className,
622622
),
623623
style: inlineStyle
624624
? {

0 commit comments

Comments
 (0)