Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited2f40a

Browse files
committed
Rebase onto latest
1 parent177eba8 commited2f40a

File tree

9 files changed

+8150
-193
lines changed

9 files changed

+8150
-193
lines changed

‎.github/workflows/coder.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ jobs:
202202
-run:yarn build
203203
working-directory:site
204204

205+
-run:yarn storybook:build
206+
working-directory:site
207+
205208
-run:yarn test:coverage
206209
working-directory:site
207210

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ yarn-error.log
1919
site/.eslintcache
2020
site/.next/
2121
site/node_modules/
22+
site/storybook-static/
2223
site/yarn-error.log
2324
coverage/
2425

‎site/.eslintignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules
55
vendor
66
out
77
coverage
8-
.next
8+
.next
9+
storybook-static

‎site/.prettierignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ yarn-error.log
1414
.next/
1515
coverage/
1616
out/
17+
storybook-static/

‎site/.storybook/main.js‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
constpath=require("path")
2+
3+
module.exports={
4+
stories:["../**/*.stories.mdx","../**/*.stories.@(js|jsx|ts|tsx)"],
5+
addons:["@storybook/addon-links","@storybook/addon-essentials"],
6+
babel:async(options)=>({
7+
...options,
8+
plugins:["@babel/plugin-proposal-class-properties"],
9+
// any extra options you want to set
10+
}),
11+
webpackFinal:async(config)=>{
12+
config.resolve.modules=[path.resolve(__dirname,".."),"node_modules"]
13+
14+
returnconfig
15+
},
16+
}

‎site/.storybook/preview.js‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
importThemeProviderfrom"@material-ui/styles/ThemeProvider"
2+
import{withThemes}from"@react-theming/storybook-addon"
3+
import{light,dark}from"../theme"
4+
import{addDecorator}from"node_modules/@storybook/react"
5+
6+
addDecorator(withThemes(ThemeProvider,[light,dark]))
7+
8+
exportconstparameters={
9+
actions:{
10+
argTypesRegex:"^on[A-Z].*",
11+
argTypesRegex:"^handle[A-Z].*",
12+
},
13+
controls:{
14+
expanded:true,
15+
matchers:{
16+
color:/(background|color)$/i,
17+
date:/Date$/,
18+
},
19+
},
20+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import{Story}from"@storybook/react"
2+
importReactfrom"react"
3+
import{LoadingButton,LoadingButtonProps}from"./LoadingButton"
4+
5+
exportdefault{
6+
title:"Button/LoadingButton",
7+
component:LoadingButton,
8+
argTypes:{
9+
loading:{control:{type:"boolean"}},
10+
children:{control:"text",defaultValue:"Create workspace"},
11+
},
12+
}
13+
14+
constTemplate:Story<LoadingButtonProps>=(args)=><LoadingButton{...args}/>
15+
16+
exportconstLoading=Template.bind({})
17+
Loading.args={
18+
variant:"contained",
19+
loading:true,
20+
}
21+
22+
exportconstNotLoading=Template.bind({})
23+
NotLoading.args={
24+
variant:"contained",
25+
loading:false,
26+
}

‎site/package.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@
1212
"format:write":"prettier --write '**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}' && sql-formatter -l postgresql ./database/query.sql -o ./database/query.sql",
1313
"lint":"jest --selectProjects lint",
1414
"lint:fix":"FIX=true yarn lint",
15+
"storybook":"start-storybook -p 6006 -s ./static",
16+
"storybook:build":"build-storybook",
1517
"test":"jest --selectProjects test",
1618
"test:coverage":"jest --selectProjects test --collectCoverage"
1719
},
1820
"devDependencies": {
1921
"@material-ui/core":"4.9.4",
2022
"@material-ui/icons":"4.5.1",
2123
"@material-ui/lab":"4.0.0-alpha.42",
24+
"@react-theming/storybook-addon":"1.1.3",
25+
"@storybook/addon-actions":"6.3.12",
26+
"@storybook/addon-essentials":"6.3.12",
27+
"@storybook/addon-links":"6.3.12",
28+
"@storybook/react":"6.3.12",
2229
"@testing-library/react":"12.1.2",
2330
"@types/express":"4.17.13",
2431
"@types/jest":"27.4.0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp