Skip to content

Commit

Permalink
added hide icon ; correct color for icons
Browse files Browse the repository at this point in the history
  • Loading branch information
roienatan committed Aug 2, 2023
1 parent 685e67d commit 19e4537
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,6 @@
.custom-dropdown-wrapper__menu {
z-index: $dropdown-z-index;
}

svg {
color: $light-gray-2;
}
}

.menuArrowButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
margin-left: 1rem;
}
}

.redIcon {
color: red;
}
8 changes: 6 additions & 2 deletions src/shared/components/ElementDropdown/ElementDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useNotification, useModal } from "@/shared/hooks";
import {
CopyIcon,
Edit3Icon,
HideIcon,
ReplyIcon,
Report2Icon,
Share3Icon,
Expand Down Expand Up @@ -213,7 +214,10 @@ const ElementDropdown: FC<ElementDropdownProps> = ({
) {
items.push({
text: (
<span className={elementDropdownStyles.menuItemRedText}>Hide</span>
<div className={elementDropdownStyles.itemContent}>
<HideIcon />
<span>Hide</span>
</div>
),
searchText: "Hide",
value: ElementDropdownMenuItems.Hide,
Expand All @@ -224,7 +228,7 @@ const ElementDropdown: FC<ElementDropdownProps> = ({
items.push({
text: (
<div className={elementDropdownStyles.itemContent}>
<Trash2Icon />
<Trash2Icon className={elementDropdownStyles.redIcon} />
<span className={elementDropdownStyles.menuItemRedText}>
Delete
</span>
Expand Down
40 changes: 40 additions & 0 deletions src/shared/icons/hide.icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React, { ReactElement } from "react";

interface HideIconProps {
className?: string;
}

export default function HideIcon({ className }: HideIconProps): ReactElement {
return (
<svg
className={className}
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10.5851 10.5879C10.21 10.963 9.99942 11.4718 9.99951 12.0022C9.99961 12.5327 10.2104 13.0414 10.5856 13.4164C10.9607 13.7914 11.4695 14.002 11.9999 14.0019C12.5304 14.0018 13.039 13.791 13.4141 13.4159"
stroke="#131B23"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M16.681 16.673C15.2782 17.5507 13.6547 18.0109 12 18C8.4 18 5.4 16 3 12C4.272 9.88003 5.712 8.32203 7.32 7.32603M10.18 6.18003C10.779 6.05876 11.3888 5.99845 12 6.00003C15.6 6.00003 18.6 8.00003 21 12C20.334 13.11 19.621 14.067 18.862 14.87"
stroke="#131B23"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M3 3L21 21"
stroke="#131B23"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
);
}
1 change: 1 addition & 0 deletions src/shared/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ export { default as FileIcon } from "./file.icon";
export { default as EmojiIcon } from "./emoji.icon";
export { default as ReplyIcon } from "./reply.icon";
export { default as CopyIcon } from "./copy.icon";
export { default as HideIcon } from "./hide.icon";

0 comments on commit 19e4537

Please sign in to comment.