Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .storybook/cloud-four-theme.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
import { create } from '@storybook/theming/create';

export default create({
base: 'light',

brandTitle: 'Cloud Four Patterns',
brandUrl: 'https://cloudfour.com',
brandImage: '/logo.svg'
});
3 changes: 2 additions & 1 deletion .storybook/main.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
const { resolve } = require('path');

module.exports = {
stories: ['../src/**/*.stories.(js|mdx)'],
// We load the welcome story separately so it will be the first sidebar item.
stories: ['../src/welcome.stories.mdx', '../src/**/*.stories.(js|mdx)'],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment explaining that this is intended to control the order? I'm aware of three methods for controlling the nav order so it would be helpful to know that is the intention here.

addons: [
// Core addons
'@storybook/addon-a11y/register',
Expand Down
1 change: 1 addition & 0 deletions .storybook/manager-head.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
<link rel="shortcut icon" href="/favicon-%NODE_ENV%.ico" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Self-closing tag not necessary in HTML5?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Prettier is adding it back in. I'll see if I can disable that.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy wow, this turns out to be a contentious topic in the Prettier community: prettier/prettier#5246

TL;DR: There's no option to disable it right now, and Prettier will always add the self-closing tag slash back in.

6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import cloudFourTheme from './cloud-four-theme';

addons.setConfig({
theme: cloudFourTheme
});
4 changes: 2 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,8 +59,8 @@
"twigjs-loader": "1.0.1"
},
"scripts": {
"storybook": "npm run svg-to-twig && start-storybook -p 6006",
"build-storybook": "npm run svg-to-twig && build-storybook",
"storybook": "npm run svg-to-twig && start-storybook -p 6006 -s static",
"build-storybook": "npm run svg-to-twig && build-storybook -s static",
"svg-to-twig": "gulp svg-to-twig",
"check-lint": "npm run check-lint:prettier && npm run check-lint:css && npm run check-lint:js",
"check-lint:prettier": "prettier --ignore-path .gitignore --list-different '**/*.{scss,js}'",
Expand Down
9 changes: 9 additions & 0 deletions src/welcome.stories.mdx
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Getting Started" />

# Welcome!

This is the pattern library for Cloud Four.

Details coming soon.
Binary file addedstatic/favicon-development.ico
Binary file not shown.
Binary file addedstatic/favicon-production.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions static/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.