mirror of
https://github.com/acid-info/lsd.git
synced 2025-01-12 10:04:24 +00:00
fix(lsd-react): fix Button typography styles
This commit is contained in:
parent
e3a5c770b2
commit
cdfb9d468e
@ -5,8 +5,9 @@ import {
|
|||||||
omitCommonProps,
|
omitCommonProps,
|
||||||
useCommonProps,
|
useCommonProps,
|
||||||
} from '../../utils/useCommonProps'
|
} from '../../utils/useCommonProps'
|
||||||
import { buttonClasses } from './Button.classes'
|
|
||||||
import { useButtonGroupContext } from '../ButtonGroup/ButtonGroup.context'
|
import { useButtonGroupContext } from '../ButtonGroup/ButtonGroup.context'
|
||||||
|
import { Typography } from '../Typography'
|
||||||
|
import { buttonClasses } from './Button.classes'
|
||||||
|
|
||||||
export type ButtonProps = CommonProps &
|
export type ButtonProps = CommonProps &
|
||||||
React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||||
@ -49,7 +50,13 @@ export const Button: React.FC<ButtonProps> & {
|
|||||||
icon && buttonClasses.withIcon,
|
icon && buttonClasses.withIcon,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span className={buttonClasses.text}>{children}</span>
|
<Typography
|
||||||
|
component="span"
|
||||||
|
className={buttonClasses.text}
|
||||||
|
variant={size === 'small' ? 'label2' : 'label1'}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Typography>
|
||||||
{icon && <span className={buttonClasses.icon}>{icon}</span>}
|
{icon && <span className={buttonClasses.icon}>{icon}</span>}
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user