Merged in fix/BOOK-293-button-variants (pull request #3371)
fix(BOOK-293): changed variants and props on IconButton component * fix(BOOK-293): changed variants and props on IconButton component * fix(BOOK-293): inherit color for icon Approved-by: Bianca Widstam Approved-by: Christel Westerberg
This commit is contained in:
committed by
Bianca Widstam
parent
2197ab2137
commit
3f632e6031
@@ -4,6 +4,7 @@ import { variants } from './variants'
|
||||
|
||||
import { cx, type VariantProps } from 'class-variance-authority'
|
||||
import type { HTMLAttributes } from 'react'
|
||||
import { Typography } from '../Typography'
|
||||
|
||||
interface FakeButtonProps
|
||||
extends
|
||||
@@ -16,7 +17,6 @@ export function FakeButton({
|
||||
variant,
|
||||
color,
|
||||
size,
|
||||
typography,
|
||||
fullWidth,
|
||||
children,
|
||||
className,
|
||||
@@ -28,19 +28,26 @@ export function FakeButton({
|
||||
color,
|
||||
size,
|
||||
variant,
|
||||
typography,
|
||||
fullWidth,
|
||||
isHovered,
|
||||
className,
|
||||
})
|
||||
|
||||
return (
|
||||
<span
|
||||
className={cx(classNames)}
|
||||
data-disabled={isDisabled || undefined}
|
||||
{...props}
|
||||
<Typography
|
||||
variant={
|
||||
size === 'sm'
|
||||
? 'Body/Supporting text (caption)/smBold'
|
||||
: 'Body/Paragraph/mdBold'
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
<span
|
||||
className={cx(classNames)}
|
||||
data-disabled={isDisabled || undefined}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
</Typography>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user