Skip to content

Commit

Permalink
Upgrade to SB v8.0.0 (non-rc) and fix reference to Icons component
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Mar 25, 2024
1 parent d5f74eb commit 2bf2b59
Show file tree
Hide file tree
Showing 3 changed files with 1,034 additions and 252 deletions.
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,18 @@
"@babel/preset-env": "^7.24.0",
"@babel/preset-typescript": "^7.23.3",
"@chromatic-com/storybook": "^1.2.1",
"@storybook/addon-essentials": "^8.0.0-rc.1",
"@storybook/addon-interactions": "^8.0.0-rc.1",
"@storybook/addon-links": "^8.0.0-rc.1",
"@storybook/addon-essentials": "^8.0.0",
"@storybook/addon-interactions": "^8.0.0",
"@storybook/addon-links": "^8.0.0",
"@storybook/addon-webpack5-compiler-swc": "^1.0.0",
"@storybook/components": "^8.0.0-rc.1",
"@storybook/core-events": "^8.0.0-rc.1",
"@storybook/manager-api": "^8.0.0-rc.1",
"@storybook/preview-api": "^8.0.0-rc.1",
"@storybook/theming": "^8.0.0-rc.1",
"@storybook/react-webpack5": "^8.0.0-rc.1",
"@storybook/types": "^8.0.0-rc.1",
"@storybook/components": "^8.0.0",
"@storybook/core-events": "^8.0.0",
"@storybook/icons": "^1.2.9",
"@storybook/manager-api": "^8.0.0",
"@storybook/preview-api": "^8.0.0",
"@storybook/theming": "^8.0.0",
"@storybook/react-webpack5": "^8.0.0",
"@storybook/types": "^8.0.0",
"@types/jest": "^29.2.4",
"@types/node": "^18.19.0",
"auto": "^11.1.1",
Expand Down
11 changes: 6 additions & 5 deletions src/manager/PseudoStateTool.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useCallback } from "react"
import { Icons, IconButton, WithTooltip, TooltipLinkList } from "@storybook/components"
import { IconButton, WithTooltip, TooltipLinkList } from "@storybook/components"
import { CheckIcon } from "@storybook/icons"
import { useGlobals } from "@storybook/manager-api"
import { styled, color } from "@storybook/theming"

Expand All @@ -9,7 +10,7 @@ const LinkTitle = styled.span<{ active?: boolean }>(({ active }) => ({
color: active ? color.secondary : "inherit",
}))

const LinkIcon = styled(Icons)<{ active?: boolean }>(({ active }) => ({
const LinkIcon = styled(CheckIcon)<{ active?: boolean }>(({ active }) => ({
opacity: active ? 1 : 0,
path: { fill: active ? color.secondary : "inherit" },
}))
Expand All @@ -25,7 +26,7 @@ export const PseudoStateTool = () => {
if (!pseudo) return false
return pseudo[option] === true
},
[pseudo]
[pseudo],
)

const toggleOption = useCallback(
Expand All @@ -37,7 +38,7 @@ export const PseudoStateTool = () => {
},
})
},
[pseudo]
[pseudo],
)

return (
Expand All @@ -49,7 +50,7 @@ export const PseudoStateTool = () => {
links={options.map((option) => ({
id: option,
title: <LinkTitle active={isActive(option)}>:{PSEUDO_STATES[option]}</LinkTitle>,
right: <LinkIcon icon="check" width={12} height={12} active={isActive(option)} />,
right: <LinkIcon width={12} height={12} active={isActive(option)} />,
onClick: toggleOption(option),
active: isActive(option),
}))}
Expand Down
Loading

0 comments on commit 2bf2b59

Please sign in to comment.