这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified packages/circle-demo-webapp/public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions packages/circle-react-elements/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const config: StorybookConfig = {
name: getAbsolutePath('@storybook/react-vite'),
options: {},
},
staticDirs: ['../public'],
core: {
disableTelemetry: true,
},
Expand Down
28 changes: 28 additions & 0 deletions packages/circle-react-elements/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { addons } from '@storybook/manager-api';
import { create } from '@storybook/theming';

// Set initial theme
addons.setConfig({
theme: create({
base: 'light',
brandTitle: 'Circle React Elements',
brandImage: './circle-logo.svg',
}),
});

// Listen for theme changes and update logo
addons.register('theme-switcher', (api) => {
const channel = api.getChannel();

if (channel) {
channel.on('DARK_MODE', (isDark) => {
const newTheme = create({
base: isDark ? 'dark' : 'light',
brandTitle: 'Circle React Elements',
brandImage: isDark ? './circle-logo-ondark.svg' : './circle-logo.svg',
});

addons.setConfig({ theme: newTheme });
});
}
});
21 changes: 21 additions & 0 deletions packages/circle-react-elements/public/circle-logo-ondark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading