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
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/theme': patch
---
Adds optional `htmlFontSize` property and also sets typography design tokens for h5 and h6 in base theme.
-12
View File
@@ -1,15 +1,3 @@
# Documentation
The Backstage documentation is available at https://backstage.io/docs
# H1
## H2
### H3
#### H4
##### H5
###### H6
+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;
};
/**
@@ -11,6 +11,20 @@ You can see also:
## Basic Markdown
Headings:
# h1
## h2
### h3
#### h4
##### h5
###### h6
Here is a bulleted list:
- Item one