1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

improve header layout [skip ci]

This commit is contained in:
checktheroads
2020-12-29 02:05:28 -07:00
parent 9886020c53
commit ac36f42d82
20 changed files with 527 additions and 327 deletions

View File

@@ -0,0 +1,19 @@
import { Heading } from '@chakra-ui/react';
import { useConfig } from '~/context';
import { useBooleanValue } from '~/hooks';
import { useHeaderCtx } from './context';
import { useTitleSize } from './useTitleSize';
export const TitleOnly = () => {
const { showSubtitle } = useHeaderCtx();
const { web } = useConfig();
const margin = useBooleanValue(showSubtitle, 2, 0);
const sizeSm = useTitleSize(web.text.title, '2xl', []);
return (
<Heading as="h1" mb={margin} fontSize={{ base: sizeSm, lg: '5xl' }}>
{web.text.title}
</Heading>
);
};