tournament-brackets-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +23 -0
- package/.storybook/preview.js +13 -0
- package/README.md +70 -0
- package/README.old.md +1 -0
- package/commands.txt +41 -0
- package/dist/esm/CollapsedLeft-B5z4pKZL.js +1042 -0
- package/dist/esm/CollapsedLeft-B5z4pKZL.js.map +1 -0
- package/dist/esm/CollapsedLeft-B6FNo8Dp.js +727 -0
- package/dist/esm/CollapsedLeft-B6FNo8Dp.js.map +1 -0
- package/dist/esm/CollapsedLeft-BB1dXff3.js +1215 -0
- package/dist/esm/CollapsedLeft-BB1dXff3.js.map +1 -0
- package/dist/esm/CollapsedLeft-BMZwFt9m.js +879 -0
- package/dist/esm/CollapsedLeft-BMZwFt9m.js.map +1 -0
- package/dist/esm/CollapsedLeft-BYfnV5-9.js +1228 -0
- package/dist/esm/CollapsedLeft-BYfnV5-9.js.map +1 -0
- package/dist/esm/CollapsedLeft-C3BOW8Vh.js +977 -0
- package/dist/esm/CollapsedLeft-C3BOW8Vh.js.map +1 -0
- package/dist/esm/CollapsedLeft-CBPTeMn9.js +922 -0
- package/dist/esm/CollapsedLeft-CBPTeMn9.js.map +1 -0
- package/dist/esm/CollapsedLeft-CNXxlyEt.js +887 -0
- package/dist/esm/CollapsedLeft-CNXxlyEt.js.map +1 -0
- package/dist/esm/CollapsedLeft-DN7qy7MO.js +961 -0
- package/dist/esm/CollapsedLeft-DN7qy7MO.js.map +1 -0
- package/dist/esm/CollapsedLeft-DO5DyVjM.js +870 -0
- package/dist/esm/CollapsedLeft-DO5DyVjM.js.map +1 -0
- package/dist/esm/CollapsedLeft-DP4ftgM6.js +796 -0
- package/dist/esm/CollapsedLeft-DP4ftgM6.js.map +1 -0
- package/dist/esm/CollapsedLeft-DQO8oQL_.js +800 -0
- package/dist/esm/CollapsedLeft-DQO8oQL_.js.map +1 -0
- package/dist/esm/CollapsedLeft-DXyWTNAC.js +1047 -0
- package/dist/esm/CollapsedLeft-DXyWTNAC.js.map +1 -0
- package/dist/esm/CollapsedLeft-DZGhG_-q.js +728 -0
- package/dist/esm/CollapsedLeft-DZGhG_-q.js.map +1 -0
- package/dist/esm/CollapsedLeft-bAhAurv-.js +908 -0
- package/dist/esm/CollapsedLeft-bAhAurv-.js.map +1 -0
- package/dist/esm/CollapsedLeft-hF26CY1G.js +1003 -0
- package/dist/esm/CollapsedLeft-hF26CY1G.js.map +1 -0
- package/dist/esm/CollapsedRight-1CTx2ozt.js +860 -0
- package/dist/esm/CollapsedRight-1CTx2ozt.js.map +1 -0
- package/dist/esm/CollapsedRight-2mcguPWm.js +715 -0
- package/dist/esm/CollapsedRight-2mcguPWm.js.map +1 -0
- package/dist/esm/CollapsedRight-BCLyZXf2.js +863 -0
- package/dist/esm/CollapsedRight-BCLyZXf2.js.map +1 -0
- package/dist/esm/CollapsedRight-C13Vq_e3.js +1293 -0
- package/dist/esm/CollapsedRight-C13Vq_e3.js.map +1 -0
- package/dist/esm/CollapsedRight-C3-pe8RB.js +799 -0
- package/dist/esm/CollapsedRight-C3-pe8RB.js.map +1 -0
- package/dist/esm/CollapsedRight-CPLDkLx5.js +678 -0
- package/dist/esm/CollapsedRight-CPLDkLx5.js.map +1 -0
- package/dist/esm/CollapsedRight-CdwTany1.js +1388 -0
- package/dist/esm/CollapsedRight-CdwTany1.js.map +1 -0
- package/dist/esm/CollapsedRight-DGOaJHqo.js +1123 -0
- package/dist/esm/CollapsedRight-DGOaJHqo.js.map +1 -0
- package/dist/esm/CollapsedRight-DH1HTBg_.js +1034 -0
- package/dist/esm/CollapsedRight-DH1HTBg_.js.map +1 -0
- package/dist/esm/CollapsedRight-D_0End0L.js +1013 -0
- package/dist/esm/CollapsedRight-D_0End0L.js.map +1 -0
- package/dist/esm/CollapsedRight-Da0UMNrq.js +1547 -0
- package/dist/esm/CollapsedRight-Da0UMNrq.js.map +1 -0
- package/dist/esm/CollapsedRight-DjoLogzE.js +916 -0
- package/dist/esm/CollapsedRight-DjoLogzE.js.map +1 -0
- package/dist/esm/CollapsedRight-DoOykWbk.js +1219 -0
- package/dist/esm/CollapsedRight-DoOykWbk.js.map +1 -0
- package/dist/esm/CollapsedRight-RCxUtg7-.js +1140 -0
- package/dist/esm/CollapsedRight-RCxUtg7-.js.map +1 -0
- package/dist/esm/CollapsedRight-U7cf6t10.js +946 -0
- package/dist/esm/CollapsedRight-U7cf6t10.js.map +1 -0
- package/dist/esm/CollapsedRight-WXy5eWFq.js +1177 -0
- package/dist/esm/CollapsedRight-WXy5eWFq.js.map +1 -0
- package/dist/esm/Expanded-BAxI7aFR.js +1540 -0
- package/dist/esm/Expanded-BAxI7aFR.js.map +1 -0
- package/dist/esm/Expanded-BCEVV7zK.js +1572 -0
- package/dist/esm/Expanded-BCEVV7zK.js.map +1 -0
- package/dist/esm/Expanded-BJtgsFxf.js +2474 -0
- package/dist/esm/Expanded-BJtgsFxf.js.map +1 -0
- package/dist/esm/Expanded-C8Bxoixp.js +1374 -0
- package/dist/esm/Expanded-C8Bxoixp.js.map +1 -0
- package/dist/esm/Expanded-CBu5Dj05.js +1838 -0
- package/dist/esm/Expanded-CBu5Dj05.js.map +1 -0
- package/dist/esm/Expanded-CDYmOWYL.js +1589 -0
- package/dist/esm/Expanded-CDYmOWYL.js.map +1 -0
- package/dist/esm/Expanded-CUg2EMDY.js +2242 -0
- package/dist/esm/Expanded-CUg2EMDY.js.map +1 -0
- package/dist/esm/Expanded-CZX_MCio.js +1406 -0
- package/dist/esm/Expanded-CZX_MCio.js.map +1 -0
- package/dist/esm/Expanded-CmtBl1ZS.js +1626 -0
- package/dist/esm/Expanded-CmtBl1ZS.js.map +1 -0
- package/dist/esm/Expanded-Co8V5jgl.js +2024 -0
- package/dist/esm/Expanded-Co8V5jgl.js.map +1 -0
- package/dist/esm/Expanded-D2_h7YPI.js +1032 -0
- package/dist/esm/Expanded-D2_h7YPI.js.map +1 -0
- package/dist/esm/Expanded-DFP1nUBY.js +1381 -0
- package/dist/esm/Expanded-DFP1nUBY.js.map +1 -0
- package/dist/esm/Expanded-DPFndGqw.js +1118 -0
- package/dist/esm/Expanded-DPFndGqw.js.map +1 -0
- package/dist/esm/Expanded-Jrq0Bh65.js +1739 -0
- package/dist/esm/Expanded-Jrq0Bh65.js.map +1 -0
- package/dist/esm/Expanded-RJigoSw3.js +1552 -0
- package/dist/esm/Expanded-RJigoSw3.js.map +1 -0
- package/dist/esm/Expanded-vqC8qzDP.js +1388 -0
- package/dist/esm/Expanded-vqC8qzDP.js.map +1 -0
- package/dist/esm/ExpandedBase-BUpZvswi.js +88 -0
- package/dist/esm/ExpandedBase-BUpZvswi.js.map +1 -0
- package/dist/esm/NameRow-B-GWjlou.js +50 -0
- package/dist/esm/NameRow-B-GWjlou.js.map +1 -0
- package/dist/esm/Team-CLk1m4Vj.js +25 -0
- package/dist/esm/Team-CLk1m4Vj.js.map +1 -0
- package/dist/esm/TeamsBase-moB9MaNw.js +44 -0
- package/dist/esm/TeamsBase-moB9MaNw.js.map +1 -0
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.js +112 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.cjs +57871 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -0
- package/package.json +87 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/rollup.config.mjs +41 -0
- package/src/allocatePlayers.js +235 -0
- package/src/components/Facades/CollapsedLeft.jsx +26 -0
- package/src/components/Facades/CollapsedRight.jsx +27 -0
- package/src/components/Facades/Expanded.jsx +27 -0
- package/src/components/Individuals/08-Player/CollapsedLeft.jsx +340 -0
- package/src/components/Individuals/08-Player/CollapsedRight.jsx +276 -0
- package/src/components/Individuals/08-Player/Expanded.jsx +407 -0
- package/src/components/Individuals/09-Player/CollapsedLeft.jsx +386 -0
- package/src/components/Individuals/09-Player/CollapsedRight.jsx +343 -0
- package/src/components/Individuals/09-Player/Expanded.jsx +614 -0
- package/src/components/Individuals/10-Player/CollapsedLeft.jsx +315 -0
- package/src/components/Individuals/10-Player/CollapsedRight.jsx +367 -0
- package/src/components/Individuals/10-Player/Expanded.jsx +611 -0
- package/src/components/Individuals/11-Player/CollapsedLeft.jsx +352 -0
- package/src/components/Individuals/11-Player/CollapsedRight.jsx +412 -0
- package/src/components/Individuals/11-Player/Expanded.jsx +616 -0
- package/src/components/Individuals/12-Player/CollapsedLeft.jsx +396 -0
- package/src/components/Individuals/12-Player/CollapsedRight.jsx +451 -0
- package/src/components/Individuals/12-Player/Expanded.jsx +622 -0
- package/src/components/Individuals/13-Player/CollapsedLeft.jsx +426 -0
- package/src/components/Individuals/13-Player/CollapsedRight.jsx +490 -0
- package/src/components/Individuals/13-Player/Expanded.jsx +701 -0
- package/src/components/Individuals/14-Player/CollapsedLeft.jsx +458 -0
- package/src/components/Individuals/14-Player/CollapsedRight.jsx +509 -0
- package/src/components/Individuals/14-Player/Expanded.jsx +801 -0
- package/src/components/Individuals/16-Player/CollapsedLeft.jsx +514 -0
- package/src/components/Individuals/16-Player/CollapsedRight.jsx +608 -0
- package/src/components/Individuals/16-Player/Expanded.jsx +963 -0
- package/src/components/Individuals/stylesheet.module.css +360 -0
- package/src/components/NameRow.jsx +21 -0
- package/src/components/NameRowFillable.jsx +30 -0
- package/src/components/ScoreRow.jsx +29 -0
- package/src/components/ScoreRowFillable.jsx +64 -0
- package/src/components/Team.jsx +20 -0
- package/src/components/TeamFillable.jsx +25 -0
- package/src/components/Teams/08-Team/CollapsedLeft.jsx +304 -0
- package/src/components/Teams/08-Team/CollapsedRight.jsx +232 -0
- package/src/components/Teams/08-Team/Expanded.jsx +356 -0
- package/src/components/Teams/09-Team/CollapsedLeft.jsx +335 -0
- package/src/components/Teams/09-Team/CollapsedRight.jsx +282 -0
- package/src/components/Teams/09-Team/Expanded.jsx +486 -0
- package/src/components/Teams/10-Team/CollapsedLeft.jsx +269 -0
- package/src/components/Teams/10-Team/CollapsedRight.jsx +304 -0
- package/src/components/Teams/10-Team/Expanded.jsx +483 -0
- package/src/components/Teams/11-Team/CollapsedLeft.jsx +292 -0
- package/src/components/Teams/11-Team/CollapsedRight.jsx +335 -0
- package/src/components/Teams/11-Team/Expanded.jsx +491 -0
- package/src/components/Teams/12-Team/CollapsedLeft.jsx +328 -0
- package/src/components/Teams/12-Team/CollapsedRight.jsx +363 -0
- package/src/components/Teams/12-Team/Expanded.jsx +497 -0
- package/src/components/Teams/13-Team/CollapsedLeft.jsx +355 -0
- package/src/components/Teams/13-Team/CollapsedRight.jsx +399 -0
- package/src/components/Teams/13-Team/Expanded.jsx +569 -0
- package/src/components/Teams/14-Team/CollapsedLeft.jsx +382 -0
- package/src/components/Teams/14-Team/CollapsedRight.jsx +420 -0
- package/src/components/Teams/14-Team/Expanded.jsx +661 -0
- package/src/components/Teams/16-Team/CollapsedLeft.jsx +437 -0
- package/src/components/Teams/16-Team/CollapsedRight.jsx +496 -0
- package/src/components/Teams/16-Team/Expanded.jsx +795 -0
- package/src/components/Teams/stylesheet.module.css +300 -0
- package/src/components/_internal/ExpandedBase.jsx +60 -0
- package/src/components/_internal/TeamsBase.jsx +45 -0
- package/src/components/_internal/VariantFacade.jsx +26 -0
- package/src/index.js +3 -0
- package/src/scripts/convert-html-to-jsx.js +46 -0
- package/src/scripts/inject-players.js +45 -0
- package/src/scripts/scoreUtils.js +25 -0
- package/src/scripts/update-classnames.js +26 -0
- package/src/seeding.js +488 -0
- package/src/stories/Button.jsx +39 -0
- package/src/stories/Button.stories.js +49 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.jsx +56 -0
- package/src/stories/Header.stories.js +29 -0
- package/src/stories/Individuals/08-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/08-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/08-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/09-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/09-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/09-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/10-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/10-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/10-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/11-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/11-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/11-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/12-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/12-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/12-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/13-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/13-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/13-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/14-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/14-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/14-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Individuals/16-Player/CollapsedLeft.stories.jsx +30 -0
- package/src/stories/Individuals/16-Player/CollapsedRight.stories.jsx +30 -0
- package/src/stories/Individuals/16-Player/Expanded.stories.jsx +30 -0
- package/src/stories/Page.jsx +69 -0
- package/src/stories/Page.stories.js +28 -0
- package/src/stories/Teams/08-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/08-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/08-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/09-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/09-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/09-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/10-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/10-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/10-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/11-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/11-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/11-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/12-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/12-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/12-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/13-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/13-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/13-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/14-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/14-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/14-Team/Expanded.stories.jsx +33 -0
- package/src/stories/Teams/16-Team/CollapsedLeft.stories.jsx +33 -0
- package/src/stories/Teams/16-Team/CollapsedRight.stories.jsx +33 -0
- package/src/stories/Teams/16-Team/Expanded.stories.jsx +33 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/data/players.js +116 -0
- package/src/stories/data/teams.js +32 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedRight from '../../../components/Individuals/10-Player/CollapsedRight';
|
|
3
|
+
import { samplePlayers10 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/10-Player/CollapsedRight',
|
|
7
|
+
component: CollapsedRight,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedRight {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers10,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Expanded from '../../../components/Individuals/10-Player/Expanded';
|
|
3
|
+
import { samplePlayers10 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/10-Player/Expanded',
|
|
7
|
+
component: Expanded,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <Expanded {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers10,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 14,
|
|
29
|
+
playerNameFontSize: 12,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedLeft from '../../../components/Individuals/11-Player/CollapsedLeft';
|
|
3
|
+
import { samplePlayers11 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/11-Player/CollapsedLeft',
|
|
7
|
+
component: CollapsedLeft,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedLeft {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers11,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedRight from '../../../components/Individuals/11-Player/CollapsedRight';
|
|
3
|
+
import { samplePlayers11 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/11-Player/CollapsedRight',
|
|
7
|
+
component: CollapsedRight,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedRight {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers11,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Expanded from '../../../components/Individuals/11-Player/Expanded';
|
|
3
|
+
import { samplePlayers11 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/11-Player/Expanded',
|
|
7
|
+
component: Expanded,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <Expanded {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers11,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 14,
|
|
29
|
+
playerNameFontSize: 12,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedLeft from '../../../components/Individuals/12-Player/CollapsedLeft';
|
|
3
|
+
import { samplePlayers12 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/12-Player/CollapsedLeft',
|
|
7
|
+
component: CollapsedLeft,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedLeft {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers12,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedRight from '../../../components/Individuals/12-Player/CollapsedRight';
|
|
3
|
+
import { samplePlayers12 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/12-Player/CollapsedRight',
|
|
7
|
+
component: CollapsedRight,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedRight {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers12,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Expanded from '../../../components/Individuals/12-Player/Expanded';
|
|
3
|
+
import { samplePlayers12 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/12-Player/Expanded',
|
|
7
|
+
component: Expanded,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <Expanded {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers12,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedLeft from '../../../components/Individuals/13-Player/CollapsedLeft';
|
|
3
|
+
import { samplePlayers13 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/13-Player/CollapsedLeft',
|
|
7
|
+
component: CollapsedLeft,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedLeft {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers13,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedRight from '../../../components/Individuals/13-Player/CollapsedRight';
|
|
3
|
+
import { samplePlayers13 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/13-Player/CollapsedRight',
|
|
7
|
+
component: CollapsedRight,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedRight {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers13,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Expanded from '../../../components/Individuals/13-Player/Expanded';
|
|
3
|
+
import { samplePlayers13 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/13-Player/Expanded',
|
|
7
|
+
component: Expanded,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <Expanded {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers13,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedLeft from '../../../components/Individuals/14-Player/CollapsedLeft';
|
|
3
|
+
import { samplePlayers14 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/14-Player/CollapsedLeft',
|
|
7
|
+
component: CollapsedLeft,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedLeft {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers14,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedRight from '../../../components/Individuals/14-Player/CollapsedRight';
|
|
3
|
+
import { samplePlayers14 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/14-Player/CollapsedRight',
|
|
7
|
+
component: CollapsedRight,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedRight {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers14,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Expanded from '../../../components/Individuals/14-Player/Expanded';
|
|
3
|
+
import { samplePlayers14 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/14-Player/Expanded',
|
|
7
|
+
component: Expanded,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <Expanded {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers14,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 14,
|
|
29
|
+
playerNameFontSize: 12,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedLeft from '../../../components/Individuals/16-Player/CollapsedLeft';
|
|
3
|
+
import { samplePlayers16 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/16-Player/CollapsedLeft',
|
|
7
|
+
component: CollapsedLeft,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedLeft {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers16,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CollapsedRight from '../../../components/Individuals/16-Player/CollapsedRight';
|
|
3
|
+
import { samplePlayers16 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/16-Player/CollapsedRight',
|
|
7
|
+
component: CollapsedRight,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <CollapsedRight {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers16,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 11,
|
|
29
|
+
playerNameFontSize: 11,
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Expanded from '../../../components/Individuals/16-Player/Expanded';
|
|
3
|
+
import { samplePlayers16 } from '../../data/players';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Individuals/16-Player/Expanded',
|
|
7
|
+
component: Expanded,
|
|
8
|
+
argTypes: {
|
|
9
|
+
players: { control: 'object' },
|
|
10
|
+
fontFamily: { control: 'text' },
|
|
11
|
+
playerIDFontSize: {
|
|
12
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
13
|
+
description: 'ID cell font size in pt'
|
|
14
|
+
},
|
|
15
|
+
playerNameFontSize: {
|
|
16
|
+
control: { type:'number', min:6, max:72, step:1 },
|
|
17
|
+
description: 'Name cell font size in pt'
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const Template = (args) => <Expanded {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.args = {
|
|
26
|
+
players: samplePlayers16,
|
|
27
|
+
fontFamily: 'Arial, sans-serif',
|
|
28
|
+
playerIDFontSize: 14,
|
|
29
|
+
playerNameFontSize: 12,
|
|
30
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Header } from './Header';
|
|
4
|
+
import './page.css';
|
|
5
|
+
|
|
6
|
+
export const Page = () => {
|
|
7
|
+
const [user, setUser] = React.useState();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<article>
|
|
11
|
+
<Header
|
|
12
|
+
user={user}
|
|
13
|
+
onLogin={() => setUser({ name: 'Jane Doe' })}
|
|
14
|
+
onLogout={() => setUser(undefined)}
|
|
15
|
+
onCreateAccount={() => setUser({ name: 'Jane Doe' })}
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<section className="storybook-page">
|
|
19
|
+
<h2>Pages in Storybook</h2>
|
|
20
|
+
<p>
|
|
21
|
+
We recommend building UIs with a{' '}
|
|
22
|
+
<a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
|
|
23
|
+
<strong>component-driven</strong>
|
|
24
|
+
</a>{' '}
|
|
25
|
+
process starting with atomic components and ending with pages.
|
|
26
|
+
</p>
|
|
27
|
+
<p>
|
|
28
|
+
Render pages with mock data. This makes it easy to build and review page states without
|
|
29
|
+
needing to navigate to them in your app. Here are some handy patterns for managing page
|
|
30
|
+
data in Storybook:
|
|
31
|
+
</p>
|
|
32
|
+
<ul>
|
|
33
|
+
<li>
|
|
34
|
+
Use a higher-level connected component. Storybook helps you compose such data from the
|
|
35
|
+
"args" of child component stories
|
|
36
|
+
</li>
|
|
37
|
+
<li>
|
|
38
|
+
Assemble data in the page component from your services. You can mock these services out
|
|
39
|
+
using Storybook.
|
|
40
|
+
</li>
|
|
41
|
+
</ul>
|
|
42
|
+
<p>
|
|
43
|
+
Get a guided tutorial on component-driven development at{' '}
|
|
44
|
+
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
|
|
45
|
+
Storybook tutorials
|
|
46
|
+
</a>
|
|
47
|
+
. Read more in the{' '}
|
|
48
|
+
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
|
|
49
|
+
docs
|
|
50
|
+
</a>
|
|
51
|
+
.
|
|
52
|
+
</p>
|
|
53
|
+
<div className="tip-wrapper">
|
|
54
|
+
<span className="tip">Tip</span> Adjust the width of the canvas with the{' '}
|
|
55
|
+
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
|
56
|
+
<g fill="none" fillRule="evenodd">
|
|
57
|
+
<path
|
|
58
|
+
d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
|
|
59
|
+
id="a"
|
|
60
|
+
fill="#999"
|
|
61
|
+
/>
|
|
62
|
+
</g>
|
|
63
|
+
</svg>
|
|
64
|
+
Viewports addon in the toolbar
|
|
65
|
+
</div>
|
|
66
|
+
</section>
|
|
67
|
+
</article>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { expect, userEvent, within } from '@storybook/test';
|
|
2
|
+
|
|
3
|
+
import { Page } from './Page';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Example/Page',
|
|
7
|
+
component: Page,
|
|
8
|
+
parameters: {
|
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const LoggedOut = {};
|
|
15
|
+
|
|
16
|
+
// More on component testing: https://storybook.js.org/docs/writing-tests/component-testing
|
|
17
|
+
export const LoggedIn = {
|
|
18
|
+
play: async ({ canvasElement }) => {
|
|
19
|
+
const canvas = within(canvasElement);
|
|
20
|
+
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
21
|
+
await expect(loginButton).toBeInTheDocument();
|
|
22
|
+
await userEvent.click(loginButton);
|
|
23
|
+
await expect(loginButton).not.toBeInTheDocument();
|
|
24
|
+
|
|
25
|
+
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
26
|
+
await expect(logoutButton).toBeInTheDocument();
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import CollapsedLeft from "../../../components/Teams/08-Team/CollapsedLeft";
|
|
3
|
+
import { sampleTeams8 } from "../../data/teams";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Teams/08-Team/CollapsedLeft',
|
|
7
|
+
component: CollapsedLeft,
|
|
8
|
+
argTypes: {
|
|
9
|
+
teams: { control: 'object' },
|
|
10
|
+
teamIDFontFamily: {
|
|
11
|
+
control: 'text',
|
|
12
|
+
description: 'CSS font-family for the team-ID cell'
|
|
13
|
+
},
|
|
14
|
+
teamIDColor: {
|
|
15
|
+
control: 'color',
|
|
16
|
+
description: 'CSS text color for the team-ID cell'
|
|
17
|
+
},
|
|
18
|
+
teamIDFontSize: {
|
|
19
|
+
control: { type: 'number', min: 6, max: 72, step: 1 },
|
|
20
|
+
description:'Font size (in points) for the team-ID cell',
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const Template = (args) => <CollapsedLeft {...args} />;
|
|
26
|
+
|
|
27
|
+
export const Default = Template.bind({});
|
|
28
|
+
Default.args = {
|
|
29
|
+
teams: sampleTeams8,
|
|
30
|
+
teamIDFontFamily: 'Arial, sans-serif',
|
|
31
|
+
teamIDColor: '#c00',
|
|
32
|
+
teamIDFontSize: 11,
|
|
33
|
+
};
|