Skip to content

Commit

Permalink
chore(release): 1.250.0
Browse files Browse the repository at this point in the history
# [1.250.0](v1.249.0...v1.250.0) (2025-02-14)

### Features

* added redesigned navbar ([cd90fb7](cd90fb7))
  • Loading branch information
semantic-release-bot authored and He1DAr committed Feb 15, 2025
1 parent cd90fb7 commit 6c9f379
Show file tree
Hide file tree
Showing 29 changed files with 2,325 additions and 160 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;
72 changes: 63 additions & 9 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
import { ChakraProvider } from '@chakra-ui/react';
import { ChakraProvider, defaultSystem } from '@chakra-ui/react';
import { withThemeByClassName } from '@storybook/addon-themes';
import type { Preview } from '@storybook/react';
import React from 'react';
import { AppRouterContext } from 'next/dist/shared/lib/app-router-context.shared-runtime';
import React, { useEffect } from 'react';

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

const preview: Preview = {
globalTypes: {
theme: {
description: 'Color mode selector',
toolbar: {
title: 'Color mode',
icon: 'circlehollow',
items: ['light', 'dark'],
dynamicTitle: true,
},
},
},
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
Expand All @@ -14,16 +34,50 @@ const preview: Preview = {
date: /Date$/i,
},
},
nextRouter: {
Provider: AppRouterContext.Provider,
pathname: '/',
asPath: '/',
query: {},
push() {},
},
nextjs: {
appDirectory: true,
},
},
decorators: [
Story => (
<ChakraProvider value={system}>
<Story />
</ChakraProvider>
),
(Story, context) => {
const selectedTheme = context.globals.theme || 'light';
useEffect(() => {
const html = document.querySelector('html');
if (html) {
html.classList.remove('light', 'dark');
html.classList.add(selectedTheme);
const docsStory = document.querySelector('.docs-story');
if (docsStory) {
docsStory.setAttribute(
'style',
`background-color: ${selectedTheme === 'dark' ? '#0C0C0D' : '#EAE8E6'} !important;`
);
}
}
}, [selectedTheme]);
return (
<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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.250.0](https://github.com/hirosystems/explorer/compare/v1.249.0...v1.250.0) (2025-02-14)


### Features

* added redesigned navbar ([cd90fb7](https://github.com/hirosystems/explorer/commit/cd90fb7bf500ab1c761ab9a75414b6d7b8c1a4a5))

# [1.249.0](https://github.com/hirosystems/explorer/compare/v1.248.1...v1.249.0) (2025-02-13)


Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,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 @@ -171,6 +172,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 6c9f379

Please sign in to comment.