/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import type { FC } from "react"; import { Logo } from "@plane/propel/emoji-icon-picker"; import type { ISvgIcons } from "@plane/propel/icons"; import type { TLogoProps } from "@plane/types"; import { getFileURL, truncateText } from "@plane/utils"; type TSwitcherIconProps = { logo_props?: TLogoProps; logo_url?: string; LabelIcon: FC; size?: number; type?: "lucide" | "material"; }; export function SwitcherIcon({ logo_props, logo_url, LabelIcon, size = 12, type = "lucide" }: TSwitcherIconProps) { if (logo_props?.in_use) { return ; } if (logo_url) { return ( logo ); } return ; } type TSwitcherLabelProps = { logo_props?: TLogoProps; logo_url?: string; name?: string; LabelIcon: FC; type?: "lucide" | "material"; }; export function SwitcherLabel(props: TSwitcherLabelProps) { const { logo_props, name, LabelIcon, logo_url, type = "lucide" } = props; return (
{truncateText(name ?? "", 40)}
); }