From 640b72abc699251cf2e7d4f2888bcb83aee85103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 18:40:13 -0300 Subject: [PATCH 1/2] fix: add :hover color for hero buttons on dark mode --- src/components/UI/downloads/DownloadsHero.tsx | 9 +++++++-- src/components/UI/homepage/HomeHero.tsx | 4 ++-- src/theme/foundations/textStyles.ts | 11 +++++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/UI/downloads/DownloadsHero.tsx b/src/components/UI/downloads/DownloadsHero.tsx index 3792864f71..9588bded9f 100644 --- a/src/components/UI/downloads/DownloadsHero.tsx +++ b/src/components/UI/downloads/DownloadsHero.tsx @@ -80,12 +80,17 @@ export const DownloadsHero: FC = ({ {Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string) => { const { name, buildURL, Svg, ariaLabel } = DOWNLOAD_HEADER_BUTTONS[key]; + return ( - @@ -49,7 +49,7 @@ export const HomeHero: FC = () => { - diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index ade07a1901..64d1949408 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -77,7 +77,8 @@ export const textStyles = { fontFamily: 'heading', color: 'bg', fontWeight: 700, - textTransform: 'uppercase' + textTransform: 'uppercase', + _groupHover: { color: 'yellow.50' } }, 'home-section-link-label': { fontFamily: 'heading', @@ -124,13 +125,15 @@ export const textStyles = { fontFamily: 'heading', color: 'bg', fontSize: { base: 'md', lg: 'xl' }, - textTransform: 'uppercase' + textTransform: 'uppercase', + _groupHover: { color: 'yellow.50' } }, 'downloads-button-sublabel': { fontFamily: 'heading', color: 'bg', fontSize: { base: 'xs', lg: 'sm' }, - textTransform: 'uppercase' + textTransform: 'uppercase', + _groupHover: { color: 'yellow.50' } }, 'download-tab-label': { fontFamily: 'heading', @@ -190,7 +193,7 @@ export const textStyles = { fontWeight: 400, fontSize: '13px', lineHeight: 5, - letterSpacing: '1%', + letterSpacing: '1%' }, 'note-text': { fontFamily: 'body', From 026757a5dbc47d652d1022a8db4fdebbf4644e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 18:41:50 -0300 Subject: [PATCH 2/2] chore: prettier --- src/components/UI/Header.tsx | 4 +++- src/components/UI/docs/DocsLinks.tsx | 8 ++++---- src/components/UI/docs/DocumentNav.tsx | 6 +++--- src/components/UI/docs/LinksList.tsx | 14 +++++++++----- src/components/UI/docs/MDComponents.tsx | 17 ++++++++++++----- src/components/UI/svgs/AddIcon.tsx | 6 +++--- src/components/UI/svgs/MinusIcon.tsx | 4 ++-- src/pages/[...slug].tsx | 5 ++++- 8 files changed, 40 insertions(+), 24 deletions(-) diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 18cac9ca19..8cb57d07c3 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -29,7 +29,9 @@ export const Header: FC = () => { > - go-ethereum + + go-ethereum + diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index ab77e803ae..167ed00ffe 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -9,7 +9,7 @@ import { Stack, Text } from '@chakra-ui/react'; -import { AddIcon, MinusIcon } from '../svgs/' +import { AddIcon, MinusIcon } from '../svgs/'; import NextLink from 'next/link'; import { useRouter } from 'next/router'; @@ -27,7 +27,7 @@ export const DocsLinks: FC = ({ navLinks }) => { return ( {navLinks.map(({ id, to, items }, idx) => { - const split = to?.split('/') + const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return ( @@ -62,7 +62,7 @@ export const DocsLinks: FC = ({ navLinks }) => { verticalAlign: '-1.25px', marginInlineEnd: 2, fontSize: 'lg', - display: isActive ? 'unset' : 'none', + display: isActive ? 'unset' : 'none' }} _groupHover={{ color: 'bg' }} > @@ -100,4 +100,4 @@ export const DocsLinks: FC = ({ navLinks }) => { })} ); -} +}; diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index e5d0c39877..25dc3e2d19 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -36,19 +36,19 @@ export const DocumentNav: FC = ({ content }) => { _hover={{ background: 'primary', boxShadow: '0 0 0 6px var(--chakra-colors-primary)', - color: 'bg', + color: 'bg' }} _focus={{ background: 'primary', boxShadow: '0 0 0 6px var(--chakra-colors-primary) !important', color: 'bg', outline: '2px solid var(--chakra-colors-secondary) !important', - outlineOffset: '4px', + outlineOffset: '4px' }} _active={{ background: 'secondary', boxShadow: '0 0 0 6px var(--chakra-colors-secondary)', - color: 'bg', + color: 'bg' }} > {heading?.title} diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index 6c9d838e1d..a7b870615a 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -15,10 +15,15 @@ export const LinksList: FC = ({ links }) => { return ( {links.map(({ id, to, items }) => { - const split = to?.split('/') + const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return to ? ( - + = ({ links }) => { verticalAlign: '-1.25px', marginInlineEnd: 2, fontSize: 'lg', - display: isActive ? 'unset' : 'none', + display: isActive ? 'unset' : 'none' }} _groupHover={{ color: 'bg', - boxShadow: '0 0 0 var(--chakra-space-2) var(--chakra-colors-primary)', - + boxShadow: '0 0 0 var(--chakra-space-2) var(--chakra-colors-primary)' }} > {id} diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 994809ca89..8fb2278bcc 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -42,7 +42,7 @@ const MDComponents = { }, // headings h1: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( @@ -51,16 +51,23 @@ const MDComponents = { ); }, h2: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( - + {parsedChildren} ); }, h3: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( {parsedChildren} @@ -68,7 +75,7 @@ const MDComponents = { ); }, h4: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( diff --git a/src/components/UI/svgs/AddIcon.tsx b/src/components/UI/svgs/AddIcon.tsx index fe8f3016c9..c4ddec18af 100644 --- a/src/components/UI/svgs/AddIcon.tsx +++ b/src/components/UI/svgs/AddIcon.tsx @@ -8,9 +8,9 @@ const Icon = createIcon({ viewBox: `0 0 ${w} ${h}`, path: ( - - - + + + ) diff --git a/src/components/UI/svgs/MinusIcon.tsx b/src/components/UI/svgs/MinusIcon.tsx index 689f611370..71a72d1b92 100644 --- a/src/components/UI/svgs/MinusIcon.tsx +++ b/src/components/UI/svgs/MinusIcon.tsx @@ -8,8 +8,8 @@ const Icon = createIcon({ viewBox: `0 0 ${w} ${h}`, path: ( - - + + ) diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 1d1eab5cd0..86380e3a38 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -116,7 +116,10 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - +