[WEB-3759] chore: header revamp for cycles, modules, pages and views (#6875)

* chore: header revamp for cycles, modules, pages and views

* chore: moved list fetch to layout level
This commit is contained in:
Vamsi Krishna 2025-04-09 14:56:57 +05:30 committed by GitHub
parent 2b411de1e3
commit 993c7899b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 269 additions and 453 deletions

View file

@ -6,3 +6,4 @@ export * from "./logo";
export * from "./pro-icon";
export * from "./count-chip";
export * from "./activity";
export * from "./switcher-label";

View file

@ -0,0 +1,27 @@
import { FC } from "react";
import { TLogoProps } from "@plane/types";
import { ISvgIcons, Logo } from "@plane/ui";
import { getFileURL } from "@plane/utils";
import { truncateText } from "@/helpers/string.helper";
type TSwitcherLabelProps = {
logo_props?: TLogoProps;
logo_url?: string;
name?: string;
LabelIcon: FC<ISvgIcons>;
};
export const SwitcherLabel: FC<TSwitcherLabelProps> = (props) => {
const { logo_props, name, LabelIcon, logo_url } = props;
return (
<div className="flex items-center gap-1 text-custom-text-200">
{logo_props?.in_use ? (
<Logo logo={logo_props} size={12} type="lucide" />
) : logo_url ? (
<img src={getFileURL(logo_url)} alt="logo" className="rounded-sm w-3 h-3 object-cover" />
) : (
<LabelIcon height={12} width={12} />
)}
{truncateText(name ?? "", 40)}
</div>
);
};