Updating Storybook base styles (#12862)

* Adding branding and updating styles for storybook docs

* Making code blocks light gray
feature/default_network_editable
George Marshall 3 years ago committed by GitHub
parent 6dbf6e3ab3
commit 4cd957953d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .storybook/manager.js
  2. 10
      .storybook/metamask-storybook-theme.js
  3. 56
      .storybook/preview-head.html

@ -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…
Cancel
Save