1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00
2020-12-29 02:05:28 -07:00

21 lines
563 B
TypeScript

import { Heading } from '@chakra-ui/react';
import { useConfig, useBreakpointValue } from '~/context';
import { useTitleSize } from './useTitleSize';
export const SubtitleOnly = () => {
const { web } = useConfig();
const sizeSm = useTitleSize(web.text.subtitle, 'sm');
const fontSize = useBreakpointValue({ base: sizeSm, lg: 'xl' });
return (
<Heading
as="h3"
fontWeight="normal"
fontSize={fontSize}
whiteSpace="break-spaces"
textAlign={{ base: 'left', xl: 'center' }}>
{web.text.subtitle}
</Heading>
);
};