feat: active
This commit is contained in:
16
src/components/Typography/Link.tsx
Normal file
16
src/components/Typography/Link.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import React, { FC, ComponentProps } from 'react'
|
||||
import { Typography, TypographyProps } from 'antd'
|
||||
import styled from 'styled-components'
|
||||
|
||||
type LinkProps = ComponentProps<TypographyProps['Link']> & {
|
||||
inherit?: boolean
|
||||
}
|
||||
|
||||
const StyledLink = styled(Typography.Link)<{
|
||||
$inherit?: boolean
|
||||
}>`
|
||||
${({ $inherit }) => $inherit ? 'font-size: inherit;line-height:inherit;' : ''}
|
||||
`
|
||||
export const Link: FC<LinkProps> = ({ inherit, ...props }) => {
|
||||
return <StyledLink {...props} $inherit={inherit} />
|
||||
}
|
Reference in New Issue
Block a user