Skip to content

Commit

Permalink
Merge pull request #136 from ubie-oss/add-chromatic-settings
Browse files Browse the repository at this point in the history
add chromatic command
  • Loading branch information
takanorip committed Sep 24, 2024
2 parents 11bb4a9 + a3b99aa commit e0c35da
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 33 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Chromatic"

on: push

jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true
16 changes: 11 additions & 5 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<link type="text/css" rel="stylesheet" href="" id="reset-css"/>
<link type="text/css" rel="stylesheet" href="" id="reset-css" />

<script>
document.documentElement.setAttribute('lang', 'ja');
</script>

<style>
html {
font-family: Helvetica Neue, Arial, Hiragino Kaku Gothic ProN, Hiragino Sans, Meiryo, sans-serif;
}
</style>
html {
font-family:
Helvetica Neue,
Arial,
Hiragino Kaku Gothic ProN,
Hiragino Sans,
Meiryo,
sans-serif;
}
</style>
50 changes: 25 additions & 25 deletions .storybook/public/styles/modern-css-reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*,
*::before,
*::after {
box-sizing: border-box;
box-sizing: border-box;
}

/* Remove default margin */
Expand All @@ -18,59 +18,59 @@ figure,
blockquote,
dl,
dd {
margin: 0;
margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
list-style: none;
ul[role='list'],
ol[role='list'] {
list-style: none;
}

/* Set core root defaults */
html:focus-within {
scroll-behavior: smooth;
scroll-behavior: smooth;
}

/* Set core body defaults */
body {
min-height: 100vh;
text-rendering: optimizespeed;
line-height: 1.5;
min-height: 100vh;
text-rendering: optimizespeed;
line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
text-decoration-skip-ink: auto;
text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
display: block;
max-width: 100%;
display: block;
max-width: 100%;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
font: inherit;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
html:focus-within {
scroll-behavior: auto;
}
html:focus-within {
scroll-behavior: auto;
}

*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
}
}
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@
"react": "^17 || ^18",
"react-dom": "^18"
},
"author": "Ubie, Inc.",
"author": {
"name": "Ubie, Inc."
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/ubie-oss/ubie-ui/issues"
Expand Down

0 comments on commit e0c35da

Please sign in to comment.