/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import type { Meta, StoryObj } from "@storybook/react-vite"; import { ActionsIconsMap, ArrowsIconsMap, LayoutIconsMap, MiscIconsMap, ProjectIconsMap, PropertyIconsMap, SubBrandIconsMap, WorkspaceIconsMap, } from "./constants"; import { Icon } from "./icon"; import { CycleIcon } from "./project/cycle-icon"; import { HomeIcon } from "./workspace/home-icon"; import { ProjectIcon } from "./workspace/project-icon"; const meta: Meta = { title: "Icons", parameters: { layout: "padded", docs: { description: { component: "A comprehensive collection of all icons used throughout the application. Supports both direct imports and registry-based usage.", }, }, }, }; export default meta; type Story = StoryObj; export const AllIcons: Story = { render: () => (

Sub-Brand Icons

{SubBrandIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Workspace Icons

{WorkspaceIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Project Icons

{ProjectIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Layout Icons

{LayoutIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Property Icons

{PropertyIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Actions Icons

{ActionsIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Arrows Icons

{ArrowsIconsMap.map((item) => (
{item.icon}

{item.title}

))}

Misc Icons

{MiscIconsMap.map((item) => (
{item.icon}

{item.title}

))}
), }; export const RegistryUsage: Story = { render: () => (

Registry-Based Usage

Use the Icon component with{" "} name prop for dynamic icon selection.

workspace.home

project.cycle

layout.board

property.priority

Direct Import Usage

Import icon components directly for better tree-shaking and type safety.

HomeIcon

CycleIcon

ProjectIcon

), }; export const IconSizes: Story = { render: () => (

Icon Sizes

Icons can be rendered in different sizes using width and height props.

12x12

16x16 (default)

24x24

32x32

48x48

), };