1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Updating Storybook base styles (#12862)

* Adding branding and updating styles for storybook docs

* Making code blocks light gray
This commit is contained in:
George Marshall 2021-12-02 09:11:35 -08:00 committed by GitHub
parent 6dbf6e3ab3
commit 4cd957953d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 0 deletions

6
.storybook/manager.js Normal file
View File

@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import MetaMaskStorybookTheme from './metamask-storybook-theme';
addons.setConfig({
theme: MetaMaskStorybookTheme,
});

View File

@ -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,
});

View File

@ -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>