chore:format
This commit is contained in:
@@ -1,20 +1,17 @@
|
|||||||
import type { StorybookConfig } from '@storybook/sveltekit';
|
import type { StorybookConfig } from '@storybook/sveltekit';
|
||||||
|
|
||||||
const config: StorybookConfig = {
|
const config: StorybookConfig = {
|
||||||
"stories": [
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
|
||||||
"../src/**/*.mdx",
|
addons: [
|
||||||
"../src/**/*.stories.@(js|ts|svelte)"
|
'@storybook/addon-svelte-csf',
|
||||||
],
|
'@chromatic-com/storybook',
|
||||||
"addons": [
|
'@storybook/addon-docs',
|
||||||
"@storybook/addon-svelte-csf",
|
'@storybook/addon-a11y',
|
||||||
"@chromatic-com/storybook",
|
'@storybook/addon-vitest'
|
||||||
"@storybook/addon-docs",
|
],
|
||||||
"@storybook/addon-a11y",
|
framework: {
|
||||||
"@storybook/addon-vitest"
|
name: '@storybook/sveltekit',
|
||||||
],
|
options: {}
|
||||||
"framework": {
|
}
|
||||||
"name": "@storybook/sveltekit",
|
|
||||||
"options": {}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
export default config;
|
export default config;
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import type { Preview } from '@storybook/sveltekit'
|
import type { Preview } from '@storybook/sveltekit';
|
||||||
|
|
||||||
const preview: Preview = {
|
const preview: Preview = {
|
||||||
parameters: {
|
parameters: {
|
||||||
controls: {
|
controls: {
|
||||||
matchers: {
|
matchers: {
|
||||||
color: /(background|color)$/i,
|
color: /(background|color)$/i,
|
||||||
date: /Date$/i,
|
date: /Date$/i
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default preview;
|
export default preview;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const CACHE = `cache-${version}`;
|
|||||||
|
|
||||||
const ASSETS = [
|
const ASSETS = [
|
||||||
...build, // the app itself
|
...build, // the app itself
|
||||||
...files // everything in `static`
|
...files // everything in `static`
|
||||||
];
|
];
|
||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<script module>
|
<script module>
|
||||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||||
import Button from './Button.svelte';
|
import Button from './Button.svelte';
|
||||||
import { fn } from 'storybook/test';
|
import { fn } from 'storybook/test';
|
||||||
|
|
||||||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
||||||
const { Story } = defineMeta({
|
const { Story } = defineMeta({
|
||||||
title: 'Example/Button',
|
title: 'Example/Button',
|
||||||
component: Button,
|
component: Button,
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
argTypes: {
|
argTypes: {
|
||||||
backgroundColor: { control: 'color' },
|
backgroundColor: { control: 'color' },
|
||||||
size: {
|
size: {
|
||||||
control: { type: 'select' },
|
control: { type: 'select' },
|
||||||
options: ['small', 'medium', 'large'],
|
options: ['small', 'medium', 'large']
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
args: {
|
args: {
|
||||||
onclick: fn(),
|
onclick: fn()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- More on writing stories with args: https://storybook.js.org/docs/writing-stories/args -->
|
<!-- More on writing stories with args: https://storybook.js.org/docs/writing-stories/args -->
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import './button.css';
|
import './button.css';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
/** Is this the principal call to action on the page? */
|
/** Is this the principal call to action on the page? */
|
||||||
primary?: boolean;
|
primary?: boolean;
|
||||||
/** What background color to use */
|
/** What background color to use */
|
||||||
backgroundColor?: string;
|
backgroundColor?: string;
|
||||||
/** How large should the button be? */
|
/** How large should the button be? */
|
||||||
size?: 'small' | 'medium' | 'large';
|
size?: 'small' | 'medium' | 'large';
|
||||||
/** Button contents */
|
/** Button contents */
|
||||||
label: string;
|
label: string;
|
||||||
/** The onclick event handler */
|
/** The onclick event handler */
|
||||||
onclick?: () => void;
|
onclick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { primary = false, backgroundColor, size = 'medium', label, ...props }: Props = $props();
|
const { primary = false, backgroundColor, size = 'medium', label, ...props }: Props = $props();
|
||||||
|
|
||||||
let mode = $derived(primary ? 'storybook-button--primary' : 'storybook-button--secondary');
|
let mode = $derived(primary ? 'storybook-button--primary' : 'storybook-button--secondary');
|
||||||
let style = $derived(backgroundColor ? `background-color: ${backgroundColor}` : '');
|
let style = $derived(backgroundColor ? `background-color: ${backgroundColor}` : '');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
|
class={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
|
||||||
{style}
|
{style}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,35 +1,37 @@
|
|||||||
import { Meta } from "@storybook/addon-docs/blocks";
|
import { Meta } from '@storybook/addon-docs/blocks';
|
||||||
|
|
||||||
import Github from "./assets/github.svg";
|
import Github from './assets/github.svg';
|
||||||
import Discord from "./assets/discord.svg";
|
import Discord from './assets/discord.svg';
|
||||||
import Youtube from "./assets/youtube.svg";
|
import Youtube from './assets/youtube.svg';
|
||||||
import Tutorials from "./assets/tutorials.svg";
|
import Tutorials from './assets/tutorials.svg';
|
||||||
import Styling from "./assets/styling.png";
|
import Styling from './assets/styling.png';
|
||||||
import Context from "./assets/context.png";
|
import Context from './assets/context.png';
|
||||||
import Assets from "./assets/assets.png";
|
import Assets from './assets/assets.png';
|
||||||
import Docs from "./assets/docs.png";
|
import Docs from './assets/docs.png';
|
||||||
import Share from "./assets/share.png";
|
import Share from './assets/share.png';
|
||||||
import FigmaPlugin from "./assets/figma-plugin.png";
|
import FigmaPlugin from './assets/figma-plugin.png';
|
||||||
import Testing from "./assets/testing.png";
|
import Testing from './assets/testing.png';
|
||||||
import Accessibility from "./assets/accessibility.png";
|
import Accessibility from './assets/accessibility.png';
|
||||||
import Theming from "./assets/theming.png";
|
import Theming from './assets/theming.png';
|
||||||
import AddonLibrary from "./assets/addon-library.png";
|
import AddonLibrary from './assets/addon-library.png';
|
||||||
|
|
||||||
export const RightArrow = () => <svg
|
export const RightArrow = () => (
|
||||||
viewBox="0 0 14 14"
|
<svg
|
||||||
width="8px"
|
viewBox="0 0 14 14"
|
||||||
height="14px"
|
width="8px"
|
||||||
style={{
|
height="14px"
|
||||||
marginLeft: '4px',
|
style={{
|
||||||
display: 'inline-block',
|
marginLeft: '4px',
|
||||||
shapeRendering: 'inherit',
|
display: 'inline-block',
|
||||||
verticalAlign: 'middle',
|
shapeRendering: 'inherit',
|
||||||
fill: 'currentColor',
|
verticalAlign: 'middle',
|
||||||
'path fill': 'currentColor'
|
fill: 'currentColor',
|
||||||
}}
|
'path fill': 'currentColor'
|
||||||
>
|
}}
|
||||||
<path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
|
>
|
||||||
</svg>
|
<path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
|
||||||
<Meta title="Configure your project" />
|
<Meta title="Configure your project" />
|
||||||
|
|
||||||
@@ -38,6 +40,7 @@ export const RightArrow = () => <svg
|
|||||||
# Configure your project
|
# Configure your project
|
||||||
|
|
||||||
Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
|
Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="sb-section">
|
<div className="sb-section">
|
||||||
<div className="sb-section-item">
|
<div className="sb-section-item">
|
||||||
@@ -84,6 +87,7 @@ export const RightArrow = () => <svg
|
|||||||
# Do more with Storybook
|
# Do more with Storybook
|
||||||
|
|
||||||
Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
|
Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="sb-section">
|
<div className="sb-section">
|
||||||
@@ -203,10 +207,11 @@ export const RightArrow = () => <svg
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
>Discover tutorials<RightArrow /></a>
|
>Discover tutorials<RightArrow /></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
{`
|
{`
|
||||||
.sb-container {
|
.sb-container {
|
||||||
margin-bottom: 48px;
|
margin-bottom: 48px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<script module>
|
<script module>
|
||||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||||
import Header from './Header.svelte';
|
import Header from './Header.svelte';
|
||||||
import { fn } from 'storybook/test';
|
import { fn } from 'storybook/test';
|
||||||
|
|
||||||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
||||||
const { Story } = defineMeta({
|
const { Story } = defineMeta({
|
||||||
title: 'Example/Header',
|
title: 'Example/Header',
|
||||||
component: Header,
|
component: Header,
|
||||||
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
parameters: {
|
parameters: {
|
||||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||||
layout: 'fullscreen',
|
layout: 'fullscreen'
|
||||||
},
|
},
|
||||||
args: {
|
args: {
|
||||||
onLogin: fn(),
|
onLogin: fn(),
|
||||||
onLogout: fn(),
|
onLogout: fn(),
|
||||||
onCreateAccount: fn(),
|
onCreateAccount: fn()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Story name="Logged In" args={{ user: { name: 'Jane Doe' } }} />
|
<Story name="Logged In" args={{ user: { name: 'Jane Doe' } }} />
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import './header.css';
|
import './header.css';
|
||||||
import Button from './Button.svelte';
|
import Button from './Button.svelte';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
user?: { name: string };
|
user?: { name: string };
|
||||||
onLogin?: () => void;
|
onLogin?: () => void;
|
||||||
onLogout?: () => void;
|
onLogout?: () => void;
|
||||||
onCreateAccount?: () => void;
|
onCreateAccount?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { user, onLogin, onLogout, onCreateAccount }: Props = $props();
|
const { user, onLogin, onLogout, onCreateAccount }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<div class="storybook-header">
|
<div class="storybook-header">
|
||||||
<div>
|
<div>
|
||||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none" fill-rule="evenodd">
|
<g fill="none" fill-rule="evenodd">
|
||||||
<path
|
<path
|
||||||
d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
|
d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
|
||||||
fill="#FFF"
|
fill="#FFF"
|
||||||
/>
|
/>
|
||||||
<path
|
<path
|
||||||
d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
|
d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
|
||||||
fill="#555AB9"
|
fill="#555AB9"
|
||||||
/>
|
/>
|
||||||
<path d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z" fill="#91BAF8" />
|
<path d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z" fill="#91BAF8" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
<h1>Acme</h1>
|
<h1>Acme</h1>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{#if user}
|
{#if user}
|
||||||
<span class="welcome">
|
<span class="welcome">
|
||||||
Welcome, <b>{user.name}</b>!
|
Welcome, <b>{user.name}</b>!
|
||||||
</span>
|
</span>
|
||||||
<Button size="small" onclick={onLogout} label="Log out" />
|
<Button size="small" onclick={onLogout} label="Log out" />
|
||||||
{:else}
|
{:else}
|
||||||
<Button size="small" onclick={onLogin} label="Log in" />
|
<Button size="small" onclick={onLogin} label="Log in" />
|
||||||
<Button primary size="small" onclick={onCreateAccount} label="Sign up" />
|
<Button primary size="small" onclick={onCreateAccount} label="Sign up" />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -1,30 +1,32 @@
|
|||||||
<script module>
|
<script module>
|
||||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||||
import { expect, userEvent, waitFor, within } from 'storybook/test';
|
import { expect, userEvent, waitFor, within } from 'storybook/test';
|
||||||
import Page from './Page.svelte';
|
import Page from './Page.svelte';
|
||||||
import { fn } from 'storybook/test';
|
import { fn } from 'storybook/test';
|
||||||
|
|
||||||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
||||||
const { Story } = defineMeta({
|
const { Story } = defineMeta({
|
||||||
title: 'Example/Page',
|
title: 'Example/Page',
|
||||||
component: Page,
|
component: Page,
|
||||||
parameters: {
|
parameters: {
|
||||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||||
layout: 'fullscreen',
|
layout: 'fullscreen'
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Story name="Logged In" play={async ({ canvasElement }) => {
|
<Story
|
||||||
const canvas = within(canvasElement);
|
name="Logged In"
|
||||||
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
play={async ({ canvasElement }) => {
|
||||||
await expect(loginButton).toBeInTheDocument();
|
const canvas = within(canvasElement);
|
||||||
await userEvent.click(loginButton);
|
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
||||||
await waitFor(() => expect(loginButton).not.toBeInTheDocument());
|
await expect(loginButton).toBeInTheDocument();
|
||||||
|
await userEvent.click(loginButton);
|
||||||
|
await waitFor(() => expect(loginButton).not.toBeInTheDocument());
|
||||||
|
|
||||||
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
||||||
await expect(logoutButton).toBeInTheDocument();
|
await expect(logoutButton).toBeInTheDocument();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Story name="Logged Out" />
|
<Story name="Logged Out" />
|
||||||
|
|||||||
@@ -1,70 +1,70 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import './page.css';
|
import './page.css';
|
||||||
import Header from './Header.svelte';
|
import Header from './Header.svelte';
|
||||||
|
|
||||||
let user = $state<{ name: string }>();
|
let user = $state<{ name: string }>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<Header
|
<Header
|
||||||
{user}
|
{user}
|
||||||
onLogin={() => (user = { name: 'Jane Doe' })}
|
onLogin={() => (user = { name: 'Jane Doe' })}
|
||||||
onLogout={() => (user = undefined)}
|
onLogout={() => (user = undefined)}
|
||||||
onCreateAccount={() => (user = { name: 'Jane Doe' })}
|
onCreateAccount={() => (user = { name: 'Jane Doe' })}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<section class="storybook-page">
|
<section class="storybook-page">
|
||||||
<h2>Pages in Storybook</h2>
|
<h2>Pages in Storybook</h2>
|
||||||
<p>
|
<p>
|
||||||
We recommend building UIs with a
|
We recommend building UIs with a
|
||||||
<a
|
<a
|
||||||
href="https://blog.hichroma.com/component-driven-development-ce1109d56c8e"
|
href="https://blog.hichroma.com/component-driven-development-ce1109d56c8e"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<strong>component-driven</strong>
|
<strong>component-driven</strong>
|
||||||
</a>
|
</a>
|
||||||
process starting with atomic components and ending with pages.
|
process starting with atomic components and ending with pages.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Render pages with mock data. This makes it easy to build and review page states without
|
Render pages with mock data. This makes it easy to build and review page states without
|
||||||
needing to navigate to them in your app. Here are some handy patterns for managing page data
|
needing to navigate to them in your app. Here are some handy patterns for managing page data
|
||||||
in Storybook:
|
in Storybook:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
Use a higher-level connected component. Storybook helps you compose such data from the
|
Use a higher-level connected component. Storybook helps you compose such data from the
|
||||||
"args" of child component stories
|
"args" of child component stories
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Assemble data in the page component from your services. You can mock these services out
|
Assemble data in the page component from your services. You can mock these services out
|
||||||
using Storybook.
|
using Storybook.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
Get a guided tutorial on component-driven development at
|
Get a guided tutorial on component-driven development at
|
||||||
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
|
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
|
||||||
Storybook tutorials
|
Storybook tutorials
|
||||||
</a>
|
</a>
|
||||||
. Read more in the
|
. Read more in the
|
||||||
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">docs</a>
|
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">docs</a>
|
||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
<div class="tip-wrapper">
|
<div class="tip-wrapper">
|
||||||
<span class="tip">Tip</span>
|
<span class="tip">Tip</span>
|
||||||
Adjust the width of the canvas with the
|
Adjust the width of the canvas with the
|
||||||
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none" fill-rule="evenodd">
|
<g fill="none" fill-rule="evenodd">
|
||||||
<path
|
<path
|
||||||
d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0
|
d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0
|
||||||
01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0
|
01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0
|
||||||
010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
|
010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
|
||||||
id="a"
|
id="a"
|
||||||
fill="#999"
|
fill="#999"
|
||||||
/>
|
/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
Viewports addon in the toolbar
|
Viewports addon in the toolbar
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
.storybook-button {
|
.storybook-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 3em;
|
border-radius: 3em;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
.storybook-button--primary {
|
.storybook-button--primary {
|
||||||
background-color: #555ab9;
|
background-color: #555ab9;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.storybook-button--secondary {
|
.storybook-button--secondary {
|
||||||
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.storybook-button--small {
|
.storybook-button--small {
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.storybook-button--medium {
|
.storybook-button--medium {
|
||||||
padding: 11px 20px;
|
padding: 11px 20px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.storybook-button--large {
|
.storybook-button--large {
|
||||||
padding: 12px 24px;
|
padding: 12px 24px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
.storybook-header {
|
.storybook-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-header svg {
|
.storybook-header svg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-header h1 {
|
.storybook-header h1 {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin: 6px 0 6px 10px;
|
margin: 6px 0 6px 10px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-header button + button {
|
.storybook-header button + button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-header .welcome {
|
.storybook-header .welcome {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,68 +1,68 @@
|
|||||||
.storybook-page {
|
.storybook-page {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 48px 20px;
|
padding: 48px 20px;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page h2 {
|
.storybook-page h2 {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin: 0 0 4px;
|
margin: 0 0 4px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page p {
|
.storybook-page p {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page a {
|
.storybook-page a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page ul {
|
.storybook-page ul {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page li {
|
.storybook-page li {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page .tip {
|
.storybook-page .tip {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
background: #e7fdd8;
|
background: #e7fdd8;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
color: #357a14;
|
color: #357a14;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page .tip-wrapper {
|
.storybook-page .tip-wrapper {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page .tip-wrapper svg {
|
.storybook-page .tip-wrapper svg {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.storybook-page .tip-wrapper svg path {
|
.storybook-page .tip-wrapper svg path {
|
||||||
fill: #1ea7fd;
|
fill: #1ea7fd;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user