import React, { FC, ComponentProps } from 'react'
import { Typography, TypographyProps } from 'antd'
import styled from 'styled-components'

type ButtonTextProps = ComponentProps<TypographyProps['Text']> & {
	level?: 1 | 2
}

const StyledButtonText = styled(Typography.Text)<{ $level: 1 | 2 }>`
  ${props => props.$level === 1 ? `
  font-weight: 500;
  font-size: 20px;
  line-height: 20px;
  ` : `
  font-weight: 400;
	font-size: 12px;
	line-height: 14px;
`}
`
export const ButtonText: FC<ButtonTextProps> = ({ level = 1, ...props }) => {
	return <StyledButtonText {...props} $level={level} />
}
