From 47bd52ffd7b40a516988f1af4b67079a0aa41614 Mon Sep 17 00:00:00 2001 From: Daniel Soares Date: Sat, 11 Dec 2021 14:22:00 -0300 Subject: [PATCH] feat: add fonts options --- src/components/Button/styles.ts | 1 - src/components/Link/index.tsx | 8 ++++---- src/components/Link/styles.ts | 1 - src/components/SocialLinks/styles.ts | 4 +--- src/pages/_app.tsx | 3 +++ src/pages/_document.tsx | 5 ++++- src/styles/fonts.ts | 18 ++++++++++++++++++ src/styles/globals.ts | 6 +++++- src/styles/stitches.config.ts | 3 +++ 9 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 src/styles/fonts.ts diff --git a/src/components/Button/styles.ts b/src/components/Button/styles.ts index 936f16b..c40ba39 100644 --- a/src/components/Button/styles.ts +++ b/src/components/Button/styles.ts @@ -46,7 +46,6 @@ export const Wrapper = styled('button', { borderWidth: '2.5px', borderStyle: 'solid', fontSize: '1rem', - fontWeight: 'bold', cursor: 'pointer', transition: 'all 0.25s ease-in-out', diff --git a/src/components/Link/index.tsx b/src/components/Link/index.tsx index b8ff07d..628dd9c 100644 --- a/src/components/Link/index.tsx +++ b/src/components/Link/index.tsx @@ -3,10 +3,10 @@ import { AnchorHTMLAttributes } from 'react' import { LinkVariantProps, Wrapper } from './styles' -export type LinkProps = AnchorHTMLAttributes & { - href: string - color?: LinkVariantProps['color'] -} +export type LinkProps = AnchorHTMLAttributes & + LinkVariantProps & { + href: string + } export function Link({ href, ...rest }: LinkProps) { return ( diff --git a/src/components/Link/styles.ts b/src/components/Link/styles.ts index f9ff1f0..f26cd38 100644 --- a/src/components/Link/styles.ts +++ b/src/components/Link/styles.ts @@ -17,7 +17,6 @@ const colorVariantFn = ( }) export const Wrapper = styled('a', { - fontWeight: 'medium', textDecoration: 'none', transition: 'color 0.25s ease', cursor: 'pointer', diff --git a/src/components/SocialLinks/styles.ts b/src/components/SocialLinks/styles.ts index 485ad8d..590a761 100644 --- a/src/components/SocialLinks/styles.ts +++ b/src/components/SocialLinks/styles.ts @@ -2,9 +2,7 @@ import { styled } from '../../styles/stitches.config' export const Wrapper = styled('ul', { display: 'inline-flex', - listStyle: 'none', - margin: 0, - padding: 0 + listStyle: 'none' }) export const SocialItem = styled('li', { diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 93928c3..46bdd72 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,5 +1,8 @@ import type { AppProps } from 'next/app' +import { globalStyles } from '../styles/globals' + export default function App({ Component, pageProps }: AppProps) { + globalStyles() return } diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 9c73de3..199aa9f 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,12 +1,15 @@ import NextDocument, { Head, Html, Main, NextScript } from 'next/document' -import { getCssText } from '../styles/stitches.config' +import { fonts, getCssText } from '../styles/stitches.config' export default class Document extends NextDocument { render() { return ( + + +