From b92b4c993615933f9f4709758313752e9602372d Mon Sep 17 00:00:00 2001 From: Dhaval Savalia Date: Sun, 18 Feb 2024 12:50:33 -0500 Subject: [PATCH 1/2] 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 a8d4153de..bdfca8c4f 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 9a0af2fcf..5ec403808 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)} /> From 2dce78200b7276969e056219fcdc58a403e60f3f Mon Sep 17 00:00:00 2001 From: Dhaval Savalia Date: Sun, 18 Feb 2024 13:29:33 -0500 Subject: [PATCH 2/2] feat(Profiles): hide network name when icon is present --- apps/artboard/src/templates/azurill.tsx | 2 +- apps/artboard/src/templates/bronzor.tsx | 2 +- apps/artboard/src/templates/chikorita.tsx | 2 +- apps/artboard/src/templates/ditto.tsx | 2 +- apps/artboard/src/templates/gengar.tsx | 2 +- apps/artboard/src/templates/glalie.tsx | 2 +- apps/artboard/src/templates/nosepass.tsx | 2 +- apps/artboard/src/templates/pikachu.tsx | 2 +- apps/artboard/src/templates/rhyhorn.tsx | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/artboard/src/templates/azurill.tsx b/apps/artboard/src/templates/azurill.tsx index 71ab30c8f..0cebca9a8 100644 --- a/apps/artboard/src/templates/azurill.tsx +++ b/apps/artboard/src/templates/azurill.tsx @@ -241,7 +241,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/bronzor.tsx b/apps/artboard/src/templates/bronzor.tsx index 34b4a4532..2881b7817 100644 --- a/apps/artboard/src/templates/bronzor.tsx +++ b/apps/artboard/src/templates/bronzor.tsx @@ -218,7 +218,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/chikorita.tsx b/apps/artboard/src/templates/chikorita.tsx index 06b5e7603..8fd8f44e8 100644 --- a/apps/artboard/src/templates/chikorita.tsx +++ b/apps/artboard/src/templates/chikorita.tsx @@ -264,7 +264,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/ditto.tsx b/apps/artboard/src/templates/ditto.tsx index 3d8dc9bd2..8d3b05c94 100644 --- a/apps/artboard/src/templates/ditto.tsx +++ b/apps/artboard/src/templates/ditto.tsx @@ -245,7 +245,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/gengar.tsx b/apps/artboard/src/templates/gengar.tsx index a40c78106..617ff68fc 100644 --- a/apps/artboard/src/templates/gengar.tsx +++ b/apps/artboard/src/templates/gengar.tsx @@ -214,7 +214,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/glalie.tsx b/apps/artboard/src/templates/glalie.tsx index e135020d9..145630eb1 100644 --- a/apps/artboard/src/templates/glalie.tsx +++ b/apps/artboard/src/templates/glalie.tsx @@ -269,7 +269,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/nosepass.tsx b/apps/artboard/src/templates/nosepass.tsx index cb7f99a9c..56ba97e6e 100644 --- a/apps/artboard/src/templates/nosepass.tsx +++ b/apps/artboard/src/templates/nosepass.tsx @@ -263,7 +263,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/pikachu.tsx b/apps/artboard/src/templates/pikachu.tsx index dcc0b919c..58f845c6f 100644 --- a/apps/artboard/src/templates/pikachu.tsx +++ b/apps/artboard/src/templates/pikachu.tsx @@ -245,7 +245,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )} diff --git a/apps/artboard/src/templates/rhyhorn.tsx b/apps/artboard/src/templates/rhyhorn.tsx index beaeba279..f0bbc6726 100644 --- a/apps/artboard/src/templates/rhyhorn.tsx +++ b/apps/artboard/src/templates/rhyhorn.tsx @@ -217,7 +217,7 @@ const Profiles = () => { ) : (

{item.username}

)} -

{item.network}

+ {!item.icon &&

{item.network}

} )}