refactor(techdocs): apply review suggestions

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2022-05-18 21:10:45 +02:00
parent b2dd93f207
commit 4c09c09102
6 changed files with 31 additions and 12 deletions
+1
View File
@@ -145,5 +145,6 @@ export type SimpleThemeOptions = {
defaultPageTheme: string;
pageTheme?: Record<string, PageTheme>;
fontFamily?: string;
htmlFontSize?: number;
};
```
+10
View File
@@ -24,6 +24,7 @@ import {
} from './types';
import { pageTheme as defaultPageThemes } from './pageTheme';
const DEFAULT_HTML_FONT_SIZE = 16;
const DEFAULT_FONT_FAMILY =
'"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';
@@ -37,6 +38,7 @@ export function createThemeOptions(
): BackstageThemeOptions {
const {
palette,
htmlFontSize = DEFAULT_HTML_FONT_SIZE,
fontFamily = DEFAULT_FONT_FAMILY,
defaultPageTheme,
pageTheme = defaultPageThemes,
@@ -57,9 +59,17 @@ export function createThemeOptions(
},
},
typography: {
htmlFontSize,
fontFamily,
h6: {
fontWeight: 700,
fontSize: 20,
marginBottom: 2,
},
h5: {
fontWeight: 700,
fontSize: 24,
marginBottom: 4,
},
h4: {
fontWeight: 700,
+1
View File
@@ -149,6 +149,7 @@ export type SimpleThemeOptions = {
defaultPageTheme: string;
pageTheme?: Record<string, PageTheme>;
fontFamily?: string;
htmlFontSize?: number;
};
/**