Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storybook] Suppression du header bleu uniquement lors du build de storybook #898

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import addons from '@storybook/addons';
import { create } from '@storybook/theming/create';

const theme = create({
base: 'light',
brandTitle: '@axa-fr/react-toolkit-all',
brandUrl: 'https://axaguildev.github.io/design-system/',
});
import toolkitTheme from './toolkit-theme';

addons.setConfig({
isFullscreen: false,
panelPosition: 'bottom',
isToolshown: true,
showRoots: false,
theme,
theme: toolkitTheme,
});
1 change: 0 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';

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

export const decorators = [withKnobs, addReadme];

Expand Down
14 changes: 0 additions & 14 deletions .storybook/storybook.css

This file was deleted.

8 changes: 8 additions & 0 deletions .storybook/toolkit-theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { create } from '@storybook/theming';
import { version } from '../lerna.json';

export default create({
base: 'light',
brandTitle: `Axa React Toolkit v${version}`,
brandUrl: 'https://axaguildev.github.io/design-system/',
});
2,789 changes: 930 additions & 1,859 deletions package-lock.json

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"clean:node_modules": "lerna clean --yes",
"style": "node ./scripts/style.js",
"storybook": "start-storybook -p 9009 -s storybook-public",
"storybook:build": "build-storybook -s storybook-public -c .storybook -o storybook-static && npm run toolkit:build",
"toolkit:build": "node ./scripts/inject-version.js",
"storybook:build": "build-storybook -s storybook-public -c .storybook -o storybook-static",
"test": "jest --config jest.config.json",
"cover": "jest --no-cache --config ./jest.config.json --coverage",
"check": "npm run check:formatting && npm run check:quality",
Expand All @@ -41,15 +40,15 @@
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"@storybook/addon-a11y": "^6.0.28",
"@storybook/addon-actions": "^6.0.28",
"@storybook/addon-essentials": "^6.0.28",
"@storybook/addon-knobs": "^6.0.28",
"@storybook/addon-viewport": "^6.0.28",
"@storybook/addons": "^6.0.28",
"@storybook/react": "^6.0.28",
"@storybook/source-loader": "^6.0.28",
"@storybook/theming": "^6.0.28",
"@storybook/addon-a11y": "^6.1.21",
"@storybook/addon-actions": "^6.1.21",
"@storybook/addon-essentials": "^6.1.21",
"@storybook/addon-knobs": "^6.1.21",
"@storybook/addon-viewport": "^6.1.21",
"@storybook/addons": "^6.1.21",
"@storybook/react": "^6.1.21",
"@storybook/source-loader": "^6.1.21",
"@storybook/theming": "^6.1.21",
"@testing-library/jest-dom": "^5.11.5",
"@testing-library/react": "^11.1.1",
"@testing-library/user-event": "^12.2.0",
Expand Down Expand Up @@ -100,7 +99,7 @@
"rimraf": "^3.0.2",
"sass-loader": "^10.0.5",
"shelljs": "^0.8.4",
"storybook-readme": "^5.0.8",
"storybook-readme": "^5.0.9",
"ts-jest": "^26.4.3",
"twit": "^2.2.11",
"typescript": "^4.0.5"
Expand Down
40 changes: 0 additions & 40 deletions scripts/inject-version.js

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/template.js

This file was deleted.

17 changes: 3 additions & 14 deletions storybook-public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="%PUBLIC_URL%/resources/favicon.ico">
<style>
.header {
background: #004893;
color: #fff;
padding: 1em;
text-align: center;
position: absolute;
z-index:1000;
bottom: 0px;
left: 0px;
}
</style>

<!--
Notice the use of %PUBLIC_URL% in the tag above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -26,11 +15,11 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Storybook</title>
<title>Storybook @axa-fr/react-toolkit</title>
</head>

<body>
<div id="root"></div>
</body>

</html>
</html>