Updating Storybook base styles (#12862)
* Adding branding and updating styles for storybook docs * Making code blocks light grayfeature/default_network_editable
parent
6dbf6e3ab3
commit
4cd957953d
@ -0,0 +1,6 @@ |
||||
import { addons } from '@storybook/addons'; |
||||
import MetaMaskStorybookTheme from './metamask-storybook-theme'; |
||||
|
||||
addons.setConfig({ |
||||
theme: MetaMaskStorybookTheme, |
||||
}); |
@ -0,0 +1,10 @@ |
||||
// .storybook/YourTheme.js
|
||||
|
||||
import { create } from '@storybook/theming'; |
||||
import logo from '../app/images/logo/metamask-logo-horizontal.svg'; |
||||
|
||||
export default create({ |
||||
base: 'light', |
||||
brandTitle: 'MetaMask Storybook', |
||||
brandImage: logo, |
||||
}); |
@ -0,0 +1,56 @@ |
||||
<link rel="preconnect" href="https://fonts.googleapis.com" /> |
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
||||
<link |
||||
href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap" |
||||
rel="stylesheet" |
||||
/> |
||||
|
||||
<style> |
||||
* { |
||||
--blue-500: #037dd6; |
||||
--blue-400: #1098fc; |
||||
--gray-pre-bg: #f8f8f8; |
||||
--font-family-base: Euclid, Roboto, Helvetica, Arial, sans-serif; |
||||
--font-family-monospace: Inconsolata, monospace; |
||||
--font-size-code: 0.875rem; |
||||
--line-height-code: 19px; |
||||
--font-size-base: 1rem; |
||||
--line-height-base: 1.7; |
||||
|
||||
font-family: var(--font-family-base) !important; |
||||
} |
||||
|
||||
h1, |
||||
h2 { |
||||
font-weight: bold !important; |
||||
} |
||||
|
||||
p, |
||||
li { |
||||
font-size: var(--font-size-base) !important; |
||||
line-height: var(--line-height-base) !important; |
||||
} |
||||
|
||||
.docblock-source { |
||||
background: var(--gray-pre-bg) !important; |
||||
} |
||||
|
||||
code { |
||||
font-family: var(--font-family-monospace) !important; |
||||
font-size: var(--font-size-code) !important; |
||||
} |
||||
code * { |
||||
font-family: var(--font-family-monospace) !important; |
||||
font-size: var(--font-size-code) !important; |
||||
} |
||||
|
||||
a { |
||||
color: var(--blue-500) !important; |
||||
} |
||||
|
||||
a:hover, |
||||
a:active, |
||||
a:focus { |
||||
color: var(--blue-400) !important; |
||||
} |
||||
</style> |
Loading…
Reference in new issue