From c6474558f162caab972ada59d2c5500c9153d8af Mon Sep 17 00:00:00 2001 From: sct Date: Tue, 18 Aug 2020 15:00:15 +0000 Subject: [PATCH] style: added Inter font for use with Tailwind UI --- src/pages/_document.tsx | 35 +++++++++++++++++++++++++++++++++++ tailwind.config.js | 8 +++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/pages/_document.tsx diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx new file mode 100644 index 000000000..feb9c040e --- /dev/null +++ b/src/pages/_document.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import Document, { + Html, + Head, + Main, + NextScript, + DocumentContext, + DocumentInitialProps, +} from 'next/document'; + +class MyDocument extends Document { + static async getInitialProps( + ctx: DocumentContext + ): Promise { + const initialProps = await Document.getInitialProps(ctx); + + return initialProps; + } + + render(): JSX.Element { + return ( + + + + + +
+ + + + ); + } +} + +export default MyDocument; diff --git a/tailwind.config.js b/tailwind.config.js index 4a591b4b0..5439340d5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,8 +1,14 @@ /* eslint-disable */ +const defaultTheme = require('tailwindcss/defaultTheme'); + module.exports = { purge: ['./pages/**/*.{ts,tsx}', './components/**/*.{ts,tsx}'], theme: { - extend: {}, + extend: { + fontFamily: { + sans: ['Inter var', ...defaultTheme.fontFamily.sans], + }, + }, }, variants: {}, plugins: [