Skip to content

Commit

Permalink
use standard @storybook/icons instead of custom ucons
Browse files Browse the repository at this point in the history
  • Loading branch information
dartess committed Feb 21, 2024
1 parent ed49807 commit d0ecd0c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 51 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@storybook/components": "^8.0.0-beta.4",
"@storybook/core-events": "^8.0.0-beta.4",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.5",
"@storybook/manager-api": "^8.0.0-beta.4",
"@storybook/theming": "^8.0.0-beta.4",
"fast-deep-equal": "^3.1.3",
Expand Down
6 changes: 2 additions & 4 deletions src/Tool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { global } from '@storybook/global';
import { themes, ThemeVars } from '@storybook/theming';
import { IconButton } from '@storybook/components';
import { MoonIcon, SunIcon } from '@storybook/icons';
import {
STORY_CHANGED,
SET_STORIES,
Expand All @@ -11,9 +12,6 @@ import { API, useParameter } from '@storybook/manager-api';
import equal from 'fast-deep-equal';
import { DARK_MODE_EVENT_NAME, UPDATE_DARK_MODE_EVENT_NAME } from './constants';

import { Sun } from './icons/Sun';
import { Moon } from './icons/Moon';

const { document, window } = global as { document: Document; window: Window };
const modes = ['light', 'dark'] as const;
type Mode = typeof modes[number];
Expand Down Expand Up @@ -260,7 +258,7 @@ export function DarkMode({ api }: DarkModeProps) {
}
onClick={handleIconClick}
>
{isDark ? <Sun /> : <Moon />}
{isDark ? <SunIcon aria-hidden="true" /> : <MoonIcon aria-hidden="true" />}
</IconButton>
);
}
Expand Down
19 changes: 0 additions & 19 deletions src/icons/Moon.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions src/icons/Sun.tsx

This file was deleted.

0 comments on commit d0ecd0c

Please sign in to comment.