Files
ihealth-kit-registration/src/components/Typography/Link.tsx
2023-04-30 23:07:43 +08:00

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} />
}