forked from FirefoxUX/photon-components-web
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an introduction to storybook with CSS link
- Add an introduction story with rendered README.md - Add CSS link to README.md - Ensure dist.zip gets deployed along with Storybook - Rework gh deployment into a shell script - Refactor some common story code into lib - Misc cleanup of old demo files - Ignore gh-pages for build & test Fixes FirefoxUX#44
- Loading branch information
Showing
24 changed files
with
172 additions
and
302 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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
storybook | ||
vendor | ||
dist | ||
deploy |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ npm-debug.log | |
*.log | ||
*.sw? | ||
*~ | ||
dist | ||
dist | ||
deploy |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
storybook | ||
vendor | ||
dist | ||
deploy | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# Skip builds without credentials | ||
if [[ -z "$GH_TOKEN" ]]; then | ||
echo "Skipping deploy for missing credentials"; | ||
exit 0; | ||
fi | ||
|
||
rm -rf deploy dist | ||
mkdir deploy | ||
npm run build | ||
cp -r storybook/* deploy/ | ||
zip -r deploy/dist.zip dist | ||
|
||
./node_modules/.bin/gh-pages \ | ||
--silent \ | ||
--dist deploy \ | ||
--user 'GH Deploy <lorchard@mozilla.com>' \ | ||
--repo https://$GH_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git |
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
File renamed without changes
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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,6 +1,6 @@ | ||
import "photon-colors/photon-colors.css"; | ||
|
||
import "./base.css"; | ||
import "./index.css"; | ||
|
||
import "./attributes"; | ||
|
||
|
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,16 @@ | ||
import React from "react"; | ||
import { action } from "@storybook/addon-actions"; | ||
import { ExtractSource } from "../.storybook/code-sample"; | ||
|
||
export const actionDefault = msg => ev => { | ||
ev.preventDefault(); | ||
action(msg)(ev); | ||
}; | ||
|
||
export const Sample = ({ children, ...props }) => ( | ||
<ExtractSource {...props}> | ||
<div className="sample" onClick={actionDefault("clicked")}> | ||
{children} | ||
</div> | ||
</ExtractSource> | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.