Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add menu and attachment icons #686

Merged
merged 3 commits into from
Oct 17, 2024
Merged
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
66 changes: 66 additions & 0 deletions src/components/icon/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export enum IconName {
gitdiff,
gpu,
refreshCircle,
rightMenu,
attachment,
newChat,
}

export function getIcon(
Expand Down Expand Up @@ -2015,6 +2018,69 @@ export function getIcon(
</svg>
);

case IconName.rightMenu:
return (
<svg
width={size}
height={size}
viewBox="0 0 22 22"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_2944_1956)">
<path
d="M19 0H3C1.35 0 0 1.35 0 3V19C0 20.65 1.35 22 3 22H19C20.65 22 22 20.65 22 19V3C22 1.35 20.65 0 19 0ZM20 3V7.22H13.55V2H19C19.55 2 20 2.45 20 3ZM13.55 13.48H20V15.74H13.55V13.48ZM13.55 11.48V9.22H20V11.48H13.55ZM2 19V3C2 2.45 2.45 2 3 2H11.55V20H3C2.45 20 2 19.55 2 19ZM19 20H13.55V17.74H20V19C20 19.55 19.55 20 19 20Z"
fill={color}
/>
<path
d="M15.09 4.87H15.75C16.3 4.87 16.75 4.42 16.75 3.87C16.75 3.32 16.3 2.87 15.75 2.87H15.09C14.54 2.87 14.09 3.32 14.09 3.87C14.09 4.42 14.54 4.87 15.09 4.87Z"
fill={color}
/>
<path
d="M18.46 4.87H18.6C19.15 4.87 19.6 4.42 19.6 3.87C19.6 3.32 19.15 2.87 18.6 2.87H18.46C17.91 2.87 17.46 3.32 17.46 3.87C17.46 4.42 17.91 4.87 18.46 4.87Z"
fill={color}
/>
</g>
<defs>
<clipPath id="clip0_2944_1956">
<rect width={size} height={size} fill="white" />
</clipPath>
</defs>
</svg>
);

case IconName.attachment:
return (
<svg
width={size}
height={size}
viewBox="0 0 18 18"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16.5255 4.60491C16.604 4.52175 16.6987 4.4555 16.8037 4.41022C16.9087 4.36494 17.0218 4.34159 17.1362 4.34159C17.2505 4.34159 17.3637 4.36494 17.4687 4.41022C17.5737 4.4555 17.6684 4.52175 17.7469 4.60491C18.0844 4.9559 18.0844 5.52469 17.7469 5.87568L7.36934 16.6835C6.97703 17.0993 6.50391 17.4305 5.97901 17.6568C5.4541 17.8832 4.88849 18 4.31684 18C3.7452 18 3.17958 17.8832 2.65468 17.6568C2.12977 17.4305 1.65666 17.0993 1.26434 16.6835C-0.421446 14.9286 -0.421446 12.0819 1.26434 10.3261L10.4205 0.789904C10.6559 0.540456 10.9398 0.341723 11.2547 0.205893C11.5697 0.0700635 11.9091 0 12.2521 0C12.5951 0 12.9345 0.0700635 13.2494 0.205893C13.5644 0.341723 13.8483 0.540456 14.0837 0.789904C15.0953 1.84288 15.0953 3.55104 14.0837 4.60491L6.14708 12.8676C6.0686 12.9506 5.974 13.0168 5.86907 13.0619C5.76415 13.1071 5.6511 13.1305 5.53685 13.1305C5.4226 13.1305 5.30956 13.1071 5.20463 13.0619C5.09971 13.0168 5.00511 12.9506 4.92662 12.8676C4.76433 12.6959 4.67391 12.4685 4.67391 12.2322C4.67391 11.9959 4.76433 11.7686 4.92662 11.5968L12.8632 3.33234C13.0258 3.16054 13.1164 2.93301 13.1164 2.69651C13.1164 2.46 13.0258 2.23247 12.8632 2.06067C12.7847 1.97752 12.6901 1.91127 12.5851 1.86599C12.48 1.82071 12.3669 1.79735 12.2525 1.79735C12.1382 1.79735 12.025 1.82071 11.92 1.86599C11.815 1.91127 11.7204 1.97752 11.6419 2.06067L2.4839 11.5986C1.47315 12.6516 1.47315 14.3598 2.4839 15.4127C2.71931 15.6622 3.00319 15.8609 3.31815 15.9968C3.6331 16.1326 3.97249 16.2027 4.31549 16.2027C4.65849 16.2027 4.99788 16.1326 5.31283 15.9968C5.62779 15.8609 5.91168 15.6622 6.14708 15.4127L16.5255 4.60491Z"
fill={color}
/>
</svg>
);

case IconName.newChat:
return (
<svg
width={size}
height={size}
viewBox="0 0 24 24"
fill={color}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M15.6729 3.91287C16.8918 2.69392 18.8682 2.69392 20.0871 3.91287C21.3061 5.13182 21.3061 7.10813 20.0871 8.32708L14.1499 14.2643C13.3849 15.0293 12.3925 15.5255 11.3215 15.6785L9.14142 15.9899C8.82983 16.0344 8.51546 15.9297 8.29289 15.7071C8.07033 15.4845 7.96554 15.1701 8.01005 14.8586L8.32149 12.6785C8.47449 11.6075 8.97072 10.615 9.7357 9.85006L15.6729 3.91287ZM18.6729 5.32708C18.235 4.88918 17.525 4.88918 17.0871 5.32708L11.1499 11.2643C10.6909 11.7233 10.3932 12.3187 10.3014 12.9613L10.1785 13.8215L11.0386 13.6986C11.6812 13.6068 12.2767 13.3091 12.7357 12.8501L18.6729 6.91287C19.1108 6.47497 19.1108 5.76499 18.6729 5.32708ZM11 3.99929C11.0004 4.55157 10.5531 4.99963 10.0008 5.00007C9.00227 5.00084 8.29769 5.00827 7.74651 5.06064C7.20685 5.11191 6.88488 5.20117 6.63803 5.32695C6.07354 5.61457 5.6146 6.07351 5.32698 6.63799C5.19279 6.90135 5.10062 7.24904 5.05118 7.8542C5.00078 8.47105 5 9.26336 5 10.4V13.6C5 14.7366 5.00078 15.5289 5.05118 16.1457C5.10062 16.7509 5.19279 17.0986 5.32698 17.3619C5.6146 17.9264 6.07354 18.3854 6.63803 18.673C6.90138 18.8072 7.24907 18.8993 7.85424 18.9488C8.47108 18.9992 9.26339 19 10.4 19H13.6C14.7366 19 15.5289 18.9992 16.1458 18.9488C16.7509 18.8993 17.0986 18.8072 17.362 18.673C17.9265 18.3854 18.3854 17.9264 18.673 17.3619C18.7988 17.1151 18.8881 16.7931 18.9393 16.2535C18.9917 15.7023 18.9991 14.9977 18.9999 13.9992C19.0003 13.4469 19.4484 12.9995 20.0007 13C20.553 13.0004 21.0003 13.4485 20.9999 14.0007C20.9991 14.9789 20.9932 15.7808 20.9304 16.4426C20.8664 17.116 20.7385 17.7136 20.455 18.2699C19.9757 19.2107 19.2108 19.9756 18.27 20.455C17.6777 20.7568 17.0375 20.8826 16.3086 20.9421C15.6008 21 14.7266 21 13.6428 21H10.3572C9.27339 21 8.39925 21 7.69138 20.9421C6.96253 20.8826 6.32234 20.7568 5.73005 20.455C4.78924 19.9756 4.02433 19.2107 3.54497 18.2699C3.24318 17.6776 3.11737 17.0374 3.05782 16.3086C2.99998 15.6007 2.99999 14.7266 3 13.6428V10.3572C2.99999 9.27337 2.99998 8.39922 3.05782 7.69134C3.11737 6.96249 3.24318 6.3223 3.54497 5.73001C4.02433 4.7892 4.78924 4.0243 5.73005 3.54493C6.28633 3.26149 6.88399 3.13358 7.55735 3.06961C8.21919 3.00673 9.02103 3.00083 9.99922 3.00007C10.5515 2.99964 10.9996 3.447 11 3.99929Z"
fill={color}
/>
</svg>
);

default:
return <svg />;
}
Expand Down