Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 60d7aed

Browse files
feat(storybook): remove header only on publish
1 parent 0b5f24b commit 60d7aed

File tree

9 files changed

+954
-1967
lines changed

9 files changed

+954
-1967
lines changed

.storybook/manager.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
import addons from '@storybook/addons';
2-
import { create } from '@storybook/theming/create';
3-
4-
const theme = create({
5-
base: 'light',
6-
brandTitle: '@axa-fr/react-toolkit-all',
7-
brandUrl: 'https://axaguildev.github.io/design-system/',
8-
});
2+
import toolkitTheme from './toolkit-theme';
93

104
addons.setConfig({
11-
isFullscreen: false,
12-
panelPosition: 'bottom',
13-
isToolshown: true,
145
showRoots: false,
15-
theme,
6+
theme: toolkitTheme,
167
});

.storybook/preview.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
44

55
import '../packages/all/dist/style/af-toolkit-core.css';
66
import '../packages/core/dist/assets/fonts/icons/af-icons.css';
7-
import './storybook.css';
87

98
export const decorators = [withKnobs, addReadme];
109

.storybook/storybook.css

Lines changed: 0 additions & 14 deletions
This file was deleted.

.storybook/toolkit-theme.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { create } from '@storybook/theming';
2+
import { version } from '../lerna.json';
3+
4+
export default create({
5+
base: 'light',
6+
brandTitle: `Axa React Toolkit v${version}`,
7+
brandUrl: 'https://axaguildev.github.io/design-system/',
8+
});

package-lock.json

Lines changed: 930 additions & 1859 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"clean:node_modules": "lerna clean --yes",
1515
"style": "node ./scripts/style.js",
1616
"storybook": "start-storybook -p 9009 -s storybook-public",
17-
"storybook:build": "build-storybook -s storybook-public -c .storybook -o storybook-static && npm run toolkit:build",
18-
"toolkit:build": "node ./scripts/inject-version.js",
17+
"storybook:build": "build-storybook -s storybook-public -c .storybook -o storybook-static",
1918
"test": "jest --config jest.config.json",
2019
"cover": "jest --no-cache --config ./jest.config.json --coverage",
2120
"check": "npm run check:formatting && npm run check:quality",
@@ -41,15 +40,15 @@
4140
"@babel/plugin-transform-runtime": "^7.12.1",
4241
"@babel/preset-env": "^7.12.1",
4342
"@babel/preset-react": "^7.12.5",
44-
"@storybook/addon-a11y": "^6.0.28",
45-
"@storybook/addon-actions": "^6.0.28",
46-
"@storybook/addon-essentials": "^6.0.28",
47-
"@storybook/addon-knobs": "^6.0.28",
48-
"@storybook/addon-viewport": "^6.0.28",
49-
"@storybook/addons": "^6.0.28",
50-
"@storybook/react": "^6.0.28",
51-
"@storybook/source-loader": "^6.0.28",
52-
"@storybook/theming": "^6.0.28",
43+
"@storybook/addon-a11y": "^6.1.21",
44+
"@storybook/addon-actions": "^6.1.21",
45+
"@storybook/addon-essentials": "^6.1.21",
46+
"@storybook/addon-knobs": "^6.1.21",
47+
"@storybook/addon-viewport": "^6.1.21",
48+
"@storybook/addons": "^6.1.21",
49+
"@storybook/react": "^6.1.21",
50+
"@storybook/source-loader": "^6.1.21",
51+
"@storybook/theming": "^6.1.21",
5352
"@testing-library/jest-dom": "^5.11.5",
5453
"@testing-library/react": "^11.1.1",
5554
"@testing-library/user-event": "^12.2.0",
@@ -100,7 +99,7 @@
10099
"rimraf": "^3.0.2",
101100
"sass-loader": "^10.0.5",
102101
"shelljs": "^0.8.4",
103-
"storybook-readme": "^5.0.8",
102+
"storybook-readme": "^5.0.9",
104103
"ts-jest": "^26.4.3",
105104
"twit": "^2.2.11",
106105
"typescript": "^4.0.5"

scripts/inject-version.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

scripts/template.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

storybook-public/index.html

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<link rel="shortcut icon" href="%PUBLIC_URL%/resources/favicon.ico">
8-
<style>
9-
.header {
10-
background: #004893;
11-
color: #fff;
12-
padding: 1em;
13-
text-align: center;
14-
position: absolute;
15-
z-index:1000;
16-
bottom: 0px;
17-
left: 0px;
18-
}
19-
</style>
8+
209
<!--
2110
Notice the use of %PUBLIC_URL% in the tag above.
2211
It will be replaced with the URL of the `public` folder during the build.
@@ -26,11 +15,11 @@
2615
work correctly both with client-side routing and a non-root public URL.
2716
Learn how to configure a non-root public URL by running `npm run build`.
2817
-->
29-
<title>Storybook</title>
18+
<title>Storybook @axa-fr/react-toolkit</title>
3019
</head>
3120

3221
<body>
3322
<div id="root"></div>
3423
</body>
3524

36-
</html>
25+
</html>

0 commit comments

Comments
 (0)