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

type AdditionalTitleProps = Omit<ComponentProps<TypographyProps['Title']>, 'level'> & {
	level?: 0 | 1 | 2 | 3 | 4 | 5
}

const StyledTitle0 = styled(Typography.Title)`
  font-size: 36px!important;
`
export const Title: FC<AdditionalTitleProps> = ({ level = 1, ...props }) => {
	if (level === 0) {
		return <StyledTitle0 {...props} />
	}
	return <Typography.Title level={level} {...props} />
}
