Skip to content

Commit

Permalink
feat: redesign - search component
Browse files Browse the repository at this point in the history
  • Loading branch information
He1DAr committed Feb 6, 2025
1 parent b3deac4 commit 4009e76
Show file tree
Hide file tree
Showing 20 changed files with 2,131 additions and 87 deletions.
7 changes: 7 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ const config: StorybookConfig = {
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'storybook-addon-next-router',
],
framework: {
name: '@storybook/nextjs',
options: {},
},
staticDirs: [
{
from: '../src/ui/theme/fonts',
to: 'src/ui/theme/fonts',
},
],
};
export default config;
36 changes: 30 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { ChakraProvider } from '@chakra-ui/react';
import { withThemeByClassName } from '@storybook/addon-themes';
import type { Preview } from '@storybook/react';
import { AppRouterContext } from 'next/dist/shared/lib/app-router-context.shared-runtime';
import React from 'react';

import { system } from '../src/ui/theme/theme';
import { Providers } from '../src/app/_components/Providers';
import {
instrumentSans,
inter,
matterMonoRegular,
matterRegular,
openSauce,
} from '../src/common/fonts';

const preview: Preview = {
parameters: {
Expand All @@ -14,16 +21,33 @@ const preview: Preview = {
date: /Date$/i,
},
},
nextRouter: {
Provider: AppRouterContext.Provider,
pathname: '/',
asPath: '/',
query: {},
push() {},
},
nextjs: {
appDirectory: true,
},
},
decorators: [
Story => (
<ChakraProvider value={system}>
<Story />
</ChakraProvider>
<Providers addedCustomNetworksCookie={undefined} removedCustomNetworksCookie={undefined}>
<main
className={`${inter.variable} ${instrumentSans.variable} ${openSauce.variable} ${matterRegular.variable} ${matterMonoRegular.variable}`}
>
<Story />
</main>
</Providers>
),
withThemeByClassName({
defaultTheme: 'light',
themes: { light: '', dark: 'dark' },
themes: {
light: '',
dark: 'dark',
},
}),
],
};
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"@storybook/addon-links": "8.3.5",
"@storybook/addon-onboarding": "8.3.5",
"@storybook/blocks": "8.3.5",
"@storybook/experimental-nextjs-vite": "8.5.2",
"@storybook/nextjs": "8.3.5",
"@storybook/react": "8.3.5",
"@storybook/test": "8.3.5",
Expand Down Expand Up @@ -170,6 +171,7 @@
"prettier": "3.1.0",
"react-test-renderer": "18.2.0",
"storybook": "8.3.5",
"storybook-addon-next-router": "4.0.2",
"ts-unused-exports": "8.0.0",
"typescript": "5.3.2",
"whatwg-fetch": "3.6.20"
Expand Down
Loading

0 comments on commit 4009e76

Please sign in to comment.