import classNames from "classnames"; import { faChevronDown, faChevronRight, faTrash, faCaretDown, faCaretUp, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { ListItem } from "components/editor-icons/comps/list/list-item"; import { Icons as ICONS, IconCustomIcon, IconCustomText, } from "components/svg/icons"; import { IconItem, IconType } from "@/types/editor"; import { ColorPicker } from "components/color-picker"; import { Range } from "components/range"; import { Input } from "components/input"; import { Switch } from "@/components/switch"; import { PremiumOverlay } from "@/components/premium/overlay"; import { FormattedMessage, useIntl } from "react-intl"; import { Label } from "@/components/label"; export const IconSelected = ({ index, totalIcons, icon, current, setCurrent, onDelete, onChange, onChangeOrder, }: { index: number; totalIcons: number; icon: IconType; current?: number | null; setCurrent: (index: number | null) => void; onDelete: (index: number) => void; onChange: (idnex: number, icon: IconType) => void; onChangeOrder: (index: number, value: number) => void; }) => { const findIcon: any = icon?.custom_text?.enabled ? IconCustomText : icon?.image ? IconCustomIcon : ICONS?.find((i: IconItem) => icon.component === i.name); const handleChange = (index: number, icon: any) => { onChange(index, icon); }; const intl = useIntl(); return (
{findIcon?.tags?.join(", ")}
X
Y
Z
X
{ const newIcon = { ...icon, shadow: { ...icon.shadow, position: { ...icon?.shadow?.position, x: target?.value ? Number(target.value) : undefined, }, }, }; handleChange(index, newIcon); }} />Y
{ const newIcon = { ...icon, shadow: { ...icon.shadow, position: { ...icon?.shadow?.position, y: target?.value ? Number(target.value) : undefined, }, }, }; handleChange(index, newIcon); }} />