-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Storybook, convert stories to CSF format, implement Chromatic (…
- Loading branch information
1 parent
627e1a8
commit f202aec
Showing
278 changed files
with
6,644 additions
and
7,326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Chromatic" | ||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: | | ||
yarn && yarn bootstrap | ||
- uses: chromaui/action@v1 | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
autoAcceptChanges: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,3 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"presets": ["@babel/preset-env", "@babel/preset-react"], | ||
"plugins": [ | ||
"@babel/plugin-syntax-dynamic-import", | ||
"@babel/plugin-syntax-import-meta", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-json-strings", | ||
[ | ||
"@babel/plugin-proposal-decorators", | ||
{ | ||
"legacy": true | ||
} | ||
], | ||
"@babel/plugin-proposal-function-sent", | ||
"@babel/plugin-proposal-export-namespace-from", | ||
"@babel/plugin-proposal-numeric-separator", | ||
"@babel/plugin-proposal-throw-expressions", | ||
"@babel/plugin-proposal-export-default-from", | ||
"@babel/plugin-proposal-logical-assignment-operators", | ||
"@babel/plugin-proposal-optional-chaining", | ||
[ | ||
"@babel/plugin-proposal-pipeline-operator", | ||
{ | ||
"proposal": "minimal" | ||
} | ||
], | ||
"@babel/plugin-proposal-nullish-coalescing-operator", | ||
"@babel/plugin-proposal-do-expressions" | ||
] | ||
}, | ||
"cjs": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": "commonjs" | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-syntax-dynamic-import", | ||
"@babel/plugin-syntax-import-meta", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-json-strings", | ||
[ | ||
"@babel/plugin-proposal-decorators", | ||
{ | ||
"legacy": true | ||
} | ||
], | ||
"@babel/plugin-proposal-function-sent", | ||
"@babel/plugin-proposal-export-namespace-from", | ||
"@babel/plugin-proposal-numeric-separator", | ||
"@babel/plugin-proposal-throw-expressions", | ||
"@babel/plugin-proposal-export-default-from", | ||
"@babel/plugin-proposal-logical-assignment-operators", | ||
"@babel/plugin-proposal-optional-chaining", | ||
[ | ||
"@babel/plugin-proposal-pipeline-operator", | ||
{ | ||
"proposal": "minimal" | ||
} | ||
], | ||
"@babel/plugin-proposal-nullish-coalescing-operator", | ||
"@babel/plugin-proposal-do-expressions" | ||
] | ||
}, | ||
"esm": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-syntax-dynamic-import", | ||
"@babel/plugin-syntax-import-meta", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-json-strings", | ||
[ | ||
"@babel/plugin-proposal-decorators", | ||
{ | ||
"legacy": true | ||
} | ||
], | ||
"@babel/plugin-proposal-function-sent", | ||
"@babel/plugin-proposal-export-namespace-from", | ||
"@babel/plugin-proposal-numeric-separator", | ||
"@babel/plugin-proposal-throw-expressions", | ||
"@babel/plugin-proposal-export-default-from", | ||
"@babel/plugin-proposal-logical-assignment-operators", | ||
"@babel/plugin-proposal-optional-chaining", | ||
[ | ||
"@babel/plugin-proposal-pipeline-operator", | ||
{ | ||
"proposal": "minimal" | ||
} | ||
], | ||
"@babel/plugin-proposal-nullish-coalescing-operator", | ||
"@babel/plugin-proposal-do-expressions" | ||
] | ||
} | ||
} | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
} |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const custom = require("./webpack.config.js"); | ||
|
||
const STORYBOOK_ENV = process.env.STORYBOOK_ENV || "default"; | ||
const isNew = STORYBOOK_ENV === "new"; | ||
|
||
const prettierConfig = { | ||
printWidth: 80, | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: false, | ||
jsxSingleQuote: false, | ||
trailingComma: "none", | ||
bracketSpacing: true, | ||
jsxBracketSameLine: false, | ||
arrowParens: "avoid", | ||
proseWrap: "preserve", | ||
htmlWhitespaceSensitivity: "css", | ||
endOfLine: "lf" | ||
}; | ||
|
||
module.exports = { | ||
stories: [ | ||
"../packages/ui-docs/docs/AboutUs/*.stories.mdx", | ||
"../**/src/**/*.stories.js", | ||
"../**/src/**/*.stories.mdx", | ||
"../**/docs/**/*.stories.js", | ||
"../**/docs/**/*.stories.mdx" | ||
], | ||
addons: [ | ||
"@storybook/addon-a11y", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-links" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import addons from "@storybook/addons"; | ||
import { themes } from "@storybook/theming"; | ||
import themeCivic from "./themeCIVIC"; | ||
|
||
addons.setConfig({ | ||
theme: themeCivic, | ||
showNav: true, | ||
showRoots: true, | ||
showPanel: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react"; | ||
import { Global } from "@emotion/core"; | ||
import { BrandTheme, BrandColors } from "@hackoregon/ui-themes"; | ||
|
||
// Override background color on HTML element so that Storybook backgrounds aren't overriden | ||
const StorybookBrandTheme = BrandTheme; | ||
StorybookBrandTheme.html.backgroundColor = "inherit"; | ||
|
||
const withGlobal = cb => ( | ||
<> | ||
<Global styles={StorybookBrandTheme} /> | ||
{cb()} | ||
</> | ||
); | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { expanded: true }, | ||
backgrounds: { | ||
values: [ | ||
{ name: "dark", value: BrandColors.primary.hex }, | ||
{ name: "light", value: BrandColors.background.hex } | ||
] | ||
} | ||
}; | ||
|
||
export const decorators = [withGlobal]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.