Skip to content

Commit

Permalink
Merge pull request eclipse-sw360#98 from eclipse-sw360/heliocastro/st…
Browse files Browse the repository at this point in the history
…orybook

Storybook
  • Loading branch information
hoangnt2 authored Aug 30, 2023
2 parents 67a7440 + ec06e0c commit b7fcfaf
Show file tree
Hide file tree
Showing 13 changed files with 19,900 additions and 7,081 deletions.
38 changes: 38 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Helio Chissini de Castro, 2023. Part of the SW360 Frontend Project.

// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/

// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE

import path from 'path'
import type { StorybookConfig } from '@storybook/nextjs'

const config: StorybookConfig = {
framework: {
name: '@storybook/nextjs',
options: {},
},
docs: {
autodocs: 'tag',
},
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
],
webpackFinal: async (config) => {
if (config.resolve) {
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, '../src'),
}
}
return config
},
}
export default config
26 changes: 26 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Helio Chissini de Castro, 2023. Part of the SW360 Frontend Project.

// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/

// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE

import type { Preview } from '@storybook/react'

import '../src/styles/globals.css'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
}

export default preview
5 changes: 2 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
// License-Filename: LICENSE

const nextConfig = {
reactStrictMode: true,
trailingSlash: false,
output: 'standalone',
reactStrictMode: true,
output: 'standalone'
}

module.exports = nextConfig
Loading

0 comments on commit b7fcfaf

Please sign in to comment.