import { FC } from "react"; import { TLogoProps } from "@plane/types"; import { ISvgIcons, Logo } from "@plane/ui"; import { getFileURL, truncateText } from "@plane/utils"; type TSwitcherIconProps = { logo_props?: TLogoProps; logo_url?: string; LabelIcon: FC; size?: number; }; export const SwitcherIcon: FC = ({ logo_props, logo_url, LabelIcon, size = 12 }) => { if (logo_props?.in_use) { return ; } if (logo_url) { return ( logo ); } return ; }; type TSwitcherLabelProps = { logo_props?: TLogoProps; logo_url?: string; name?: string; LabelIcon: FC; }; export const SwitcherLabel: FC = (props) => { const { logo_props, name, LabelIcon, logo_url } = props; return (
{truncateText(name ?? "", 40)}
); };