Skip to content

Commit 6e9dd23

Browse files
authored
Merge pull request #15 from kubit-ui/feature/update-storybook-8
Update to Storybook 8
2 parents dacf35f + 95d7971 commit 6e9dd23

File tree

19 files changed

+58
-86
lines changed

19 files changed

+58
-86
lines changed

.storybook/addons/figmaAddon/register.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { addons, types } from '@storybook/addons';
21
import { IconButton } from '@storybook/components';
3-
import { useParameter } from '@storybook/manager-api';
2+
import { addons, types, useParameter } from '@storybook/manager-api';
43
import { styled } from '@storybook/theming';
54

65
import React from 'react';

.storybook/addons/githubAddon/register.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { addons, types } from '@storybook/addons';
21
import { IconButton } from '@storybook/components';
3-
import { useParameter } from '@storybook/manager-api';
2+
import { addons, types, useParameter } from '@storybook/manager-api';
43
import { styled } from '@storybook/theming';
54

65
import React from 'react';

.storybook/addons/statusAddon/register.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Div } from '@storybook/components';
2-
import { addons, types } from '@storybook/manager-api';
3-
import { useParameter } from '@storybook/manager-api';
2+
import { addons, types, useParameter } from '@storybook/manager-api';
43

54
import React from 'react';
65

.storybook/addons/tokensAddons/register.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { addons, types } from '@storybook/addons';
2-
import { Meta, Source, Title } from '@storybook/blocks';
3-
import { AddonPanel, Placeholder, Separator, Spaced } from '@storybook/components';
4-
import { useAddonState, useArgs } from '@storybook/manager-api';
1+
import { AddonPanel, Spaced } from '@storybook/components';
2+
import { addons, types, useArgs } from '@storybook/manager-api';
53

64
import React from 'react';
75

.storybook/main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import type { StorybookConfig } from '@storybook/react-vite';
22

33
const config: StorybookConfig = {
44
stories: [
5-
'../src/components/**/*.mdx',
5+
'../.storybook/**/*.@(mdx|stories.@(js|jsx|ts|tjx|tdx|tsx))',
66
'../src/components/**/*.stories.@(js|jsx|mjs|ts|tsx)',
77
'../src/storybook/**/*.stories.@(js|jsx|mjs|ts|tsx)',
8-
'../.storybook/**/*.stories.@(js|jsx|mdx|ts|tjx|tdx|tsx)',
8+
'../.storybook/**/*.@(mdx|stories.@(js|jsx|ts|tjx|tdx|tsx))',
99
],
1010
staticDirs: ['./assets', '../assets'],
1111
addons: [
@@ -24,8 +24,10 @@ const config: StorybookConfig = {
2424
options: {},
2525
},
2626
docs: {
27-
autodocs: 'tag',
2827
defaultName: 'Documentation',
2928
},
29+
typescript: {
30+
reactDocgen: 'react-docgen-typescript',
31+
},
3032
};
3133
export default config;

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ./storybook/manager.ts
2-
import { addons } from '@storybook/addons';
2+
import { addons } from '@storybook/manager-api';
33
import { create } from '@storybook/theming';
44

55
const theme = create({

.storybook/overview/introduction.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@font-face {
2-
font-family: 'myFirstFont';
2+
font-family: 'GTAmericaFont';
33
src: url('../font/gtamericaregular.woff');
44
}
55

@@ -18,7 +18,7 @@
1818
justify-content: center;
1919
margin-left: 6rem;
2020
gap: 2rem;
21-
font-family: 'myFirstFont';
21+
font-family: 'GTAmericaFont';
2222
}
2323

2424
.welcome_title {
File renamed without changes.

.storybook/overview/introduction.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
import React from 'react';
22

3-
import Package from '../../package.json';
43
// import Package from '../../package.json';
54
import bg from './assets/cover_home.webp';
65
import './introduction.css';
76

87
export const Introduction = () => {
8+
if (
9+
localStorage.getItem('themeSelected') === null ||
10+
localStorage.getItem('themeSelected') === undefined ||
11+
localStorage.getItem('themeSelected') === '' ||
12+
localStorage.getItem('themeSelected') !== 'kubit'
13+
) {
14+
localStorage.setItem('themeSelected', 'kubit');
15+
}
16+
917
return (
1018
<div
1119
className="welcome__container"
@@ -15,8 +23,8 @@ export const Introduction = () => {
1523
}}
1624
>
1725
<div className="welcome-text-container">
18-
<h2 className="welcome_title">Kubit | react-components</h2>
19-
<h4 className="welcome_version">v.{Package.version} | Saturn</h4>
26+
<h2 className="welcome_title">Kubit | web-components</h2>
27+
<h4 className="welcome_version">{`v.1.0.0 | Saturn`}</h4>
2028
</div>
2129
</div>
2230
);

.storybook/preview.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const preview: Preview = {
3737
},
3838
},
3939
parameters: {
40-
actions: { argTypesRegex: '^on[A-Z].*' },
4140
controls: {
4241
matchers: {
4342
color: /(background|color)$/i,

0 commit comments

Comments
 (0)