chore: add textStyles to theme

pull/26459/head^2
Nicolás Quiroz 2 years ago
parent 0d0c486240
commit d1ee8d02ff
  1. 44
      src/components/UI/homepage/HomeHero.tsx
  2. 15
      src/components/UI/homepage/HomeSection.tsx
  3. 15
      src/components/UI/homepage/QuickLinks.tsx
  4. 1
      src/theme/components/Button.ts
  5. 31
      src/theme/index.ts

@ -1,4 +1,4 @@
import { Box, Button, Flex, Heading, Stack, Text } from '@chakra-ui/react'; import { Box, Button, Flex, Stack, Text } from '@chakra-ui/react';
import { FC } from 'react'; import { FC } from 'react';
import NextLink from 'next/link'; import NextLink from 'next/link';
@ -8,28 +8,16 @@ export const HomeHero: FC = () => {
return ( return (
<Stack border='2px solid' borderColor='brand.light.primary' px={4} py={{ base: 8, md: 5 }}> <Stack border='2px solid' borderColor='brand.light.primary' px={4} py={{ base: 8, md: 5 }}>
<Box mb={4}> <Box mb={4}>
<Heading <Box
as='h1' // TODO: move text style to theme as='h1'
fontFamily='"JetBrains Mono", monospace' textStyle='h1'
fontWeight={700}
fontSize='2.75rem'
lineHeight='3.375rem'
letterSpacing='5%'
color='brand.light.body'
mb={{ base: 2, md: 4 }} mb={{ base: 2, md: 4 }}
textAlign={{ base: 'center', md: 'left' }} textAlign={{ base: 'center', md: 'left' }}
> >
go-ethereum go-ethereum
</Heading> </Box>
<Text <Text textStyle='homepage-description'>
// TODO: move text style to theme
fontFamily='"JetBrains Mono", monospace'
fontWeight={700}
lineHeight='21px'
letterSpacing='0.05em'
textAlign={{ base: 'center', md: 'left' }}
>
Official Go implementation of the Ethereum protocol Official Go implementation of the Ethereum protocol
</Text> </Text>
</Box> </Box>
@ -41,15 +29,7 @@ export const HomeHero: FC = () => {
<Flex direction='column' alignItems='center' mr={{ md: 6 }}> <Flex direction='column' alignItems='center' mr={{ md: 6 }}>
<NextLink href={DOWNLOADS_PAGE} passHref> <NextLink href={DOWNLOADS_PAGE} passHref>
<Button variant='primary' as='a' mb={1}> <Button variant='primary' as='a' mb={1}>
<Text <Text textStyle='homepage-primary-label'>Download</Text>
// TODO: move to textstyles
fontFamily='"JetBrains Mono", monospace'
color='yellow.50'
fontWeight={700}
textTransform='uppercase'
>
Download
</Text>
</Button> </Button>
</NextLink> </NextLink>
@ -61,15 +41,7 @@ export const HomeHero: FC = () => {
<Flex direction='column' alignItems='center'> <Flex direction='column' alignItems='center'>
<NextLink href={`${DOCS_PAGE}/getting-started`} passHref> <NextLink href={`${DOCS_PAGE}/getting-started`} passHref>
<Button variant='primary' as='a' mb={1}> <Button variant='primary' as='a' mb={1}>
<Text <Text textStyle='homepage-primary-label'>Documentation</Text>
// TODO: move to textstyles
fontFamily='"JetBrains Mono", monospace'
color='yellow.50'
fontWeight={700}
textTransform='uppercase'
>
Documentation
</Text>
</Button> </Button>
</NextLink> </NextLink>

@ -1,4 +1,4 @@
import { Heading, Image, Link, Stack, Text } from '@chakra-ui/react'; import { Box, Image, Link, Stack, Text } from '@chakra-ui/react';
import { FC } from 'react'; import { FC } from 'react';
import NextLink from 'next/link'; import NextLink from 'next/link';
@ -34,18 +34,9 @@ export const HomeSection: FC<Props> = ({
borderColor='brand.light.primary' borderColor='brand.light.primary'
sx={{ mt: '0 !important' }} sx={{ mt: '0 !important' }}
> >
<Heading <Box as='h2' textStyle='h2'>
// TODO: move text style to theme
as='h2'
fontFamily='"JetBrains Mono", monospace'
fontWeight={400}
fontSize='1.5rem'
lineHeight='auto'
letterSpacing='4%'
color='brand.light.body'
>
{sectionTitle} {sectionTitle}
</Heading> </Box>
</Stack> </Stack>
<Stack <Stack

@ -1,4 +1,4 @@
import { Grid, GridItem, Heading, Link, Stack, Text } from '@chakra-ui/react'; import { Box, Grid, GridItem, Link, Stack, Text } from '@chakra-ui/react';
import { FC } from 'react'; import { FC } from 'react';
import NextLink from 'next/link'; import NextLink from 'next/link';
@ -8,18 +8,9 @@ export const QuickLinks: FC = () => {
return ( return (
<Stack border='2px solid' borderColor='brand.light.primary'> <Stack border='2px solid' borderColor='brand.light.primary'>
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> <Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'>
<Heading <Box as='h2' textStyle='h2'>
// TODO: move text style to theme
as='h2'
fontFamily='"JetBrains Mono", monospace'
fontWeight={400}
fontSize='1.5rem'
lineHeight='auto'
letterSpacing='4%'
color='brand.light.body'
>
Quick Links Quick Links
</Heading> </Box>
</Stack> </Stack>
<Grid templateColumns='repeat(2, 1fr)' sx={{ mt: '0 !important' }}> <Grid templateColumns='repeat(2, 1fr)' sx={{ mt: '0 !important' }}>

@ -5,7 +5,6 @@ export const Button = {
px: '32px', px: '32px',
borderRadius: 0, borderRadius: 0,
width: { base: '188px', md: 'auto' }, width: { base: '188px', md: 'auto' },
// TODO: move to theme colors
bg: 'brand.light.primary', bg: 'brand.light.primary',
_hover: { bg: 'brand.light.secondary' }, _hover: { bg: 'brand.light.secondary' },
_focus: { _focus: {

@ -18,8 +18,35 @@ const overrides = {
}, },
// TODO: fix textStyles // TODO: fix textStyles
textStyles: { textStyles: {
h1: {}, h1: {
h2: {}, fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
fontSize: '2.75rem',
lineHeight: '3.375rem',
letterSpacing: '5%',
color: 'brand.light.body'
},
h2: {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 400,
fontSize: '1.5rem',
lineHeight: 'auto',
letterSpacing: '4%',
color: 'brand.light.body'
},
'homepage-description': {
fontFamily: '"JetBrains Mono", monospace',
fontWeight: 700,
lineHeight: '21px',
letterSpacing: '0.05em',
textAlign: { base: 'center', md: 'left' }
},
'homepage-primary-label': {
fontFamily: '"JetBrains Mono", monospace',
color: 'yellow.50',
fontWeight: 700,
textTransform: 'uppercase'
},
'hero-text-small': { 'hero-text-small': {
fontSize: '13px', fontSize: '13px',
fontFamily: '"Inter", sans-serif' fontFamily: '"Inter", sans-serif'

Loading…
Cancel
Save