From b92b4c993615933f9f4709758313752e9602372d Mon Sep 17 00:00:00 2001 From: Dhaval Savalia Date: Sun, 18 Feb 2024 12:50:33 -0500 Subject: [PATCH] fix(CustomField): add a way to have icon in custom fields --- apps/client/index.html | 5 +++- .../sidebars/left/sections/custom/section.tsx | 29 +++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/apps/client/index.html b/apps/client/index.html index a8d4153d..bdfca8c4 100644 --- a/apps/client/index.html +++ b/apps/client/index.html @@ -35,10 +35,13 @@ - +
+ + + diff --git a/apps/client/src/pages/builder/sidebars/left/sections/custom/section.tsx b/apps/client/src/pages/builder/sidebars/left/sections/custom/section.tsx index 9a0af2fc..5ec40380 100644 --- a/apps/client/src/pages/builder/sidebars/left/sections/custom/section.tsx +++ b/apps/client/src/pages/builder/sidebars/left/sections/custom/section.tsx @@ -1,8 +1,15 @@ import { t } from "@lingui/macro"; import { createId } from "@paralleldrive/cuid2"; -import { DotsSixVertical, Plus, X } from "@phosphor-icons/react"; +import { DotsSixVertical, Envelope, Plus, X } from "@phosphor-icons/react"; import { CustomField as ICustomField } from "@reactive-resume/schema"; -import { Button, Input } from "@reactive-resume/ui"; +import { + Popover, + PopoverContent, + PopoverTrigger, + Tooltip, + Button, + Input, +} from "@reactive-resume/ui"; import { cn } from "@reactive-resume/utils"; import { AnimatePresence, Reorder, useDragControls } from "framer-motion"; @@ -39,10 +46,26 @@ export const CustomField = ({ field, onChange, onRemove }: CustomFieldProps) => + + + + + + + + onChange({ ...field, icon: event.target.value })} + /> + + + handleChange("name", event.target.value)} />