Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidnioulz committed Oct 17, 2024
1 parent 43433b8 commit 971713d
Show file tree
Hide file tree
Showing 29 changed files with 924 additions and 232 deletions.
25 changes: 25 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { addons } from '@storybook/manager-api'

import { defaultConfig } from '../src/index'
import type { TagBadgeParameters } from '../src/types/TagBadgeParameters'

addons.setConfig({
// tagBadges: defaultConfig satisfies TagBadgeParameters,
tagBadges: [
...defaultConfig,
{
tags: 'new',
badge: {
text: 'New!',
bgColor: '#00e256',
borderColor: '#006b0b',
fgColor: '#001c13',
tooltip: 'This component is brand new!',
},
display: {
sidebar: ['component'],
toolbar: ['component', 'docs', 'story'],
},
},
] satisfies TagBadgeParameters,
})
19 changes: 0 additions & 19 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import type { Preview } from '@storybook/react'
import { themes } from '@storybook/theming'

import ThemeProvider from './ThemeProvider'
import { defaultConfig } from '../src/index'
import type { TagBadgeParameters } from '../src/schemas/parameters'

export const decorators = [ThemeProvider]

Expand All @@ -19,23 +17,6 @@ const preview: Preview = {
theme: themes.dark,
toc: true,
},
tagBadges: [
...defaultConfig,
{
tags: 'new',
badge: {
text: 'New!',
bgColor: '#00e256',
borderColor: '#006b0b',
fgColor: '#001c13',
tooltip: 'This component is brand new!',
},
display: {
sidebar: ['component'],
toolbar: ['component', 'docs', 'story'],
},
},
] satisfies TagBadgeParameters,
},
initialGlobals: {
background: { value: 'dark' },
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"@storybook/test": "^8.4.0-alpha.7",
"@storybook/theming": "^8.4.0-alpha.7",
"@storybook/types": "^8.4.0-alpha.7",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@types/eslint__js": "^8.42.3",
"@types/node": "^18.19.54",
"@types/react": "^18.3.11",
Expand All @@ -101,6 +103,7 @@
"eslint-plugin-react": "^7.37.1",
"globals": "^15.10.0",
"husky": "^8.0.3",
"jsdom": "^25.0.1",
"lint-staged": "^13.3.0",
"node^22": "link:@types/node^22",
"npm-run-all": "^4.1.5",
Expand Down
Loading

0 comments on commit 971713d

Please sign in to comment.