17 lines
495 B
TypeScript
17 lines
495 B
TypeScript
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} />
|
|
}
|