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
4 changes: 2 additions & 2 deletions src/components/icon/Icons.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import { ComponentStory, ComponentMeta } from "@storybook/react";

import { Icon, IconProps, Icons } from ".";
import { Icon, IconProps, Icons, IconName } from ".";
import { Text } from "../text";
import { Box } from "../box";

const StorybookIconGroup = (props: Omit<IconProps, "src">) => (
<Box direction="Column" wrap="Wrap" gap="700" style={{ padding: "100px" }}>
{Object.keys(Icons).map((key) => (
{(Object.keys(Icons) as IconName[]).map((key) => (
<Box gap="600" alignItems="Center" key={key}>
<Icon src={Icons[key]} {...props} />
<Text>{key}</Text>
Expand Down
102 changes: 101 additions & 1 deletion src/components/icon/Icons.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,107 @@
import React from "react";

export type IconSrc = (filled?: boolean) => JSX.Element;
export const Icons: Record<string, IconSrc> = {
export type IconName =
| "Home"
| "User"
| "UserPlus"
| "Mail"
| "MailPlus"
| "Star"
| "PlusCircle"
| "Explore"
| "Smile"
| "SmilePlus"
| "Sticker"
| "Delete"
| "Phone"
| "Headphone"
| "Send"
| "Bell"
| "BellRing"
| "BellPing"
| "BellMute"
| "Message"
| "MessageUnread"
| "Setting"
| "Search"
| "Heart"
| "Play"
| "Pause"
| "Sun"
| "Photo"
| "Lock"
| "Vlc"
| "Flag"
| "Ball"
| "Bulb"
| "Terminal"
| "Pencil"
| "Info"
| "Shield"
| "ShieldLock"
| "ShieldUser"
| "Cup"
| "Pin"
| "VolumeHigh"
| "VolumeMute"
| "File"
| "Category"
| "Peace"
| "Eye"
| "EyeBlind"
| "Warning"
| "Hash"
| "HashLock"
| "HashGlobe"
| "HashSearch"
| "HashPlus"
| "Space"
| "SpaceLock"
| "SpaceGlobe"
| "SpaceSearch"
| "SpacePlus"
| "ChevronRight"
| "ChevronLeft"
| "ChevronTop"
| "ChevronBottom"
| "Plus"
| "Minus"
| "Cross"
| "VerticalDots"
| "HorizontalDots"
| "Check"
| "CheckTwice"
| "Download"
| "External"
| "RecentClock"
| "Power"
| "ReplyArrow"
| "ArrowGoRight"
| "ArrowGoRightPlus"
| "ArrowGoRightCross"
| "ArrowGoLeft"
| "Markdown"
| "Attachment"
| "Alphabet"
| "AlphabetUnderline"
| "Text"
| "Heading1"
| "Heading2"
| "Heading3"
| "Bold"
| "Italic"
| "Underline"
| "Strike"
| "Link"
| "Code"
| "BlockCode"
| "BlockQuote"
| "OrderList"
| "UnorderList"
| "Mention";

export const Icons: Record<IconName, IconSrc> = {
Home: (filled) =>
filled ? (
<path
Expand Down