diff --git a/src/components/common/App/getTheme.ts b/src/components/common/App/getTheme.ts index 8d8eeef85..3229f80c5 100644 --- a/src/components/common/App/getTheme.ts +++ b/src/components/common/App/getTheme.ts @@ -3,6 +3,7 @@ import { Mode } from "../../../globals"; import { ThemeColors } from "../../../styled"; import { darkTheme } from "./themes/darkTheme"; import { lightTheme } from "./themes/lightTheme"; +import { typographies } from "./typographies"; const getColors = (mode: Mode): ThemeColors => { switch (mode) { @@ -23,6 +24,7 @@ export const getTheme = ( mode, mainFont, codeFont, + typographies, colors: getColors(mode) }; }; diff --git a/src/components/common/App/typographies.ts b/src/components/common/App/typographies.ts new file mode 100644 index 000000000..00d701213 --- /dev/null +++ b/src/components/common/App/typographies.ts @@ -0,0 +1,59 @@ +import { Typographies } from "../../../styled"; + +export const typographies: Typographies = { + body: { + fontSize: "14px", + weight: { + light: 300, + regular: 400, + medium: 500, + semibold: 600, + bold: 700 + }, + lineHeight: "18px" + }, + subscript: { + fontSize: "13px", + weight: { + light: 300, + regular: 400, + medium: 500, + semibold: 600, + bold: 700 + }, + lineHeight: "16px" + }, + footNote: { + fontSize: "12px", + weight: { + light: 300, + regular: 400, + medium: 500, + semibold: 600, + bold: 600 + }, + lineHeight: "16px" + }, + captionOne: { + fontSize: "11px", + weight: { + light: 300, + regular: 400, + medium: 500, + semibold: 600, + bold: 600 + }, + lineHeight: "14px" + }, + captionTwo: { + fontSize: "10px", + weight: { + light: 300, + regular: 400, + medium: 500, + semibold: 600, + bold: 600 + }, + lineHeight: "14px" + } +}; diff --git a/src/styled.d.ts b/src/styled.d.ts index d9961638a..a7dbcb729 100644 --- a/src/styled.d.ts +++ b/src/styled.d.ts @@ -113,11 +113,34 @@ export interface ThemeColors { }; } +interface FontWeights { + regular: number; + light: number; + medium: number; + semibold: number; + bold: number; +} + +interface FontStyle { + lineHeight: string; + fontSize: string; + weight: FontWeights; +} + +export interface Typographies { + captionOne: FontStyle; + captionTwo: FontStyle; + footNote: FontStyle; + subscript: FontStyle; + body: FontStyle; +} + declare module "styled-components" { export interface DefaultTheme { mode: Mode; mainFont: string; codeFont: string; colors: ThemeColors; + typographies: Typographies; } }