generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use TypeScript for Storybook React config
- Loading branch information
Showing
24 changed files
with
436 additions
and
1,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ generated/ | |
tmp/ | ||
*.tgz | ||
.angular | ||
tsconfig.tsbuildinfo | ||
|
||
# Ignore log files | ||
*.err | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"root": "{workspaceRoot}/packages/storybook-helpers", | ||
"sourceRoot": "{projectRoot}", | ||
"projectType": "library", | ||
"targets": { | ||
"build": { | ||
"executor": "@nrwl/workspace:run-commands", | ||
"outputs": ["{projectRoot}/dist"], | ||
"options": { | ||
"command": "npm run build", | ||
"cwd": "packages/storybook-helpers", | ||
"outputPath": "packages/storybook-helpers/dist" | ||
}, | ||
"dependsOn": ["^build"] | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { ThemeVars } from '@storybook/theming'; | ||
|
||
export const theme: ThemeVars = { | ||
appBg: '#e6e6e6', | ||
appBorderColor: '#666666', | ||
appBorderRadius: 0, | ||
appContentBg: '#ffffff', | ||
barBg: 'rgb(208, 208, 208)', | ||
barSelectedColor: 'green', | ||
barTextColor: '#000000', | ||
base: 'light', | ||
brandImage: 'logo.svg', | ||
brandTitle: 'Gemeente Utrecht', | ||
brandUrl: 'https://www.utrecht.nl', | ||
colorPrimary: '#2964a3', | ||
colorSecondary: '#1b4050', | ||
fontBase: '"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, sans-serif', | ||
fontCode: 'monospace', | ||
textColor: '#1d1d1c', | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"composite": false, | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"composite": true, | ||
"esModuleInterop": true, | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
}, | ||
"extends": "../../tsconfig.json", | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["**/node_modules/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/storybook-react/config/manager.js → packages/storybook-react/config/manager.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Preview } from '@storybook/react'; | ||
import { addonStatus } from '@utrecht/storybook-helpers/src/addon-status'; | ||
import { addonThemes } from '@utrecht/storybook-helpers/src/addon-themes'; | ||
import { addonViewport } from '@utrecht/storybook-helpers/src/addon-viewport'; | ||
// import { withTests } from '@storybook/addon-jest'; | ||
// import results from '@utrecht/component-library-react/dist/.jest-test-results.json'; | ||
import React from 'react'; | ||
import '@utrecht/design-tokens/dist/index.css'; | ||
import '@utrecht/storybook-helpers/src/storybook-docs.scss'; | ||
|
||
const preview: Preview = { | ||
decorators: [ | ||
(Story: any) => <div className="utrecht-document">{Story()}</div>, | ||
// withTests({ results }), | ||
], | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
docs: { | ||
// Show code by default. | ||
// Stories without concise code snippets can hide the code at Story level. | ||
source: { | ||
state: 'open', | ||
}, | ||
}, | ||
...addonStatus, | ||
...addonThemes, | ||
...addonViewport, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
953018d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
utrecht – ./
utrecht-git-main-nl-design-system.vercel.app
utrecht.vercel.app
utrecht-nl-design-system.vercel.app