Skip to content

Commit

Permalink
convert @storybook/components's icon to @storybook/icons's icon
Browse files Browse the repository at this point in the history
  • Loading branch information
k35o committed Apr 1, 2024
1 parent e732761 commit 46eb5d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/Tool.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { memo, useCallback, useEffect } from "react";
import { useGlobals, useStorybookApi } from "@storybook/manager-api";
import { Icons, IconButton } from "@storybook/components";
import { IconButton } from "@storybook/components";
import { ADDON_ID, PARAM_KEY, TOOL_ID } from "./constants";
import { LightningIcon } from "@storybook/icons";

export const Tool = memo(function MyAddonSelector() {
const [globals, updateGlobals] = useGlobals();
Expand Down Expand Up @@ -32,7 +33,7 @@ export const Tool = memo(function MyAddonSelector() {
title="Enable my addon"
onClick={toggleMyTool}
>
<Icons icon="lightning" />
<LightningIcon />
</IconButton>
);
});
5 changes: 2 additions & 3 deletions src/components/List.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Fragment, useState } from "react";
import { styled, themes, convert } from "@storybook/theming";
import { Icons, IconsProps } from "@storybook/components";
import { ArrowDownIcon } from "@storybook/icons";

const ListWrapper = styled.ul({
listStyle: "none",
Expand All @@ -18,7 +18,7 @@ const Wrapper = styled.div({
},
});

const Icon = styled(Icons)<IconsProps>({
const Icon = styled(ArrowDownIcon)({
height: 10,
width: 10,
minWidth: 10,
Expand Down Expand Up @@ -68,7 +68,6 @@ export const ListItem: React.FC<ListItemProps> = ({ item }) => {
<Wrapper>
<HeaderBar onClick={() => onToggle(!open)} role="button">
<Icon
icon="arrowdown"
color={convert(themes.normal).appBorderColor}
style={{
transform: `rotate(${open ? 0 : -90}deg)`,
Expand Down

0 comments on commit 46eb5d2

Please sign in to comment.