snowballtools-base/packages/frontend/src/components/shared/CustomIcon
2024-02-28 16:39:26 +05:45
..
ArrowRightCircleFilledIcon.tsx Reskin Project Overview - Activity section (#134) 2024-02-28 13:31:41 +05:45
BranchIcon.tsx [T-4902: feat] Update project card (#126) 2024-02-27 21:16:38 +07:00
BranchStrokeIcon.tsx feat: add deplyment infos 2024-02-28 16:39:26 +05:45
CalendarDaysIcon.tsx feat: add deplyment infos 2024-02-28 16:39:26 +05:45
CalendarIcon.tsx [T-4845: feat] Date picker component (#97) 2024-02-23 10:22:33 +07:00
CheckIcon.tsx ️ feat: create check icon for checkbox component 2024-02-20 23:25:19 +07:00
CheckRadioIcon.tsx [T-4840: feat] Dropdown/select component (#108) 2024-02-27 12:05:16 +07:00
CheckRoundFilledIcon.tsx 🔧 chore: add icons 2024-02-22 11:46:17 +07:00
ChevronDownIcon.tsx [T-4840: feat] Dropdown/select component (#108) 2024-02-27 12:05:16 +07:00
ChevronGrabberHorizontal.tsx ️ feat: create chevron left, right, and grabbed horizontal component 2024-02-20 23:24:27 +07:00
ChevronLeft.tsx ️ feat: create chevron left, right, and grabbed horizontal component 2024-02-20 23:24:27 +07:00
ChevronRight.tsx ️ feat: create chevron left, right, and grabbed horizontal component 2024-02-20 23:24:27 +07:00
ClockIcon.tsx [T-4902: feat] Update project card (#126) 2024-02-27 21:16:38 +07:00
CrossIcon.tsx 🔧 chore: add more icons 2024-02-21 15:43:32 +07:00
CursorBoxIcon.tsx feat: add deplyment infos 2024-02-28 16:39:26 +05:45
CustomIcon.tsx ️ feat: create custom icon and plus icon component 2024-02-19 21:15:51 +07:00
EllipseIcon.tsx github page (#114) 2024-02-26 21:08:39 -05:00
EllipsesIcon.tsx github page (#114) 2024-02-26 21:08:39 -05:00
FolderIcon.tsx feat: side bar tabs + icons 2024-02-26 18:35:45 -05:00
GithubIcon.tsx private repo + repo 2024-02-26 23:50:42 -05:00
GitHubLogo.tsx [T-4902: feat] Update project card (#126) 2024-02-27 21:16:38 +07:00
GithubStrokeIcon.tsx feat: add deplyment infos 2024-02-28 16:39:26 +05:45
GitIcon.tsx github page (#114) 2024-02-26 21:08:39 -05:00
GlobeIcon.tsx [T-4867: feat] Horizontal and vertical tabs component (#84) 2024-02-21 16:13:16 +07:00
HorizontalDotIcon.tsx [T-4902: feat] Update project card (#126) 2024-02-27 21:16:38 +07:00
index.ts feat: add deplyment infos 2024-02-28 16:39:26 +05:45
InfoRoundFilledIcon.tsx 🔧 chore: add icons 2024-02-22 14:13:27 +07:00
InfoSquareIcon.tsx [T-4861: feat] Inline notification component (#86) 2024-02-22 10:45:19 +07:00
LifeBuoyIcon.tsx feat: side bar tabs + icons 2024-02-26 18:35:45 -05:00
LinkIcon.tsx feat: add deplyment infos 2024-02-28 16:39:26 +05:45
LoadingIcon.tsx 🔧 chore: add icons 2024-02-22 14:13:27 +07:00
LockIcon.tsx private repo + repo 2024-02-26 23:50:42 -05:00
NotificationBellIcon.tsx feat: prettier search area 2024-02-26 22:24:15 -05:00
PencilIcon.tsx [T-4840: feat] Dropdown/select component (#108) 2024-02-27 12:05:16 +07:00
PlusIcon.tsx ️ feat: create custom icon and plus icon component 2024-02-19 21:15:51 +07:00
QuestionMarkRoundIcon.tsx feat: side bar tabs + icons 2024-02-26 18:35:45 -05:00
README.md ️ feat: create custom icon and plus icon component 2024-02-19 21:15:51 +07:00
SearchIcon.tsx 🔧 chore: add more icons 2024-02-21 15:43:32 +07:00
SettingsSlidersIcon.tsx feat: side bar tabs + icons 2024-02-26 18:35:45 -05:00
SnowballIcon.tsx github page (#114) 2024-02-26 21:08:39 -05:00
StorageIcon.tsx feat: add deplyment infos 2024-02-28 16:39:26 +05:45
WarningDiamondIcon.tsx [T-4902: feat] Update project card (#126) 2024-02-27 21:16:38 +07:00
WarningIcon.tsx 🔧 chore: add more icons 2024-02-21 15:43:32 +07:00

1. What icons are compatible with this component?

  • Viewbox "0 0 24 24": From where you're exporting from, please make sure the icon is using viewBox="0 0 24 24" before downloading/exporting. Not doing so will result in incorrect icon scaling

2. How to add a new icon?

2.1 Sanitising the icon

  1. Duplicate a current icon e.g. CrossIcon and rename it accordingly.
  2. Rename the function inside the new file you duplicated too
  3. Replace the markup with your SVG markup (make sure it complies with the above section's rule)
  4. Depending on the svg you pasted... A. If the <svg> has only 1 child, remove the <svg> parent entirely so you only have the path left B. If your component has more than 1 paths, rename <svg> tag with the <g> tag. Then, remove all attributes of this <g> tag so that it's just <g>
  5. Usually, icons are single colored. If that's the case, replace all fill/stroke color with currentColor. E.g. . Leave the other attributes without removing them.
  6. If your icon has more than one colour, then it's up to you to decide whether we want to use tailwind to help set the fill and stroke colors
  7. Lastly, export your icon in index.ts by following what was done for CrossIcon
  8. Make sure to provide a name to the <CustomIcon> component for accessibility sake
  9. Done!

2.3 Use your newly imported icon

  1. You can change simply use <BellIcon size="32" /> to quickly change both width and height with the same value (square). For custom viewBox, width and height, simply provide all three props.
  2. Coloring the icon: Simply add a className with text color. E.g. <BellIcon className="text-gray-500" />