[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:
parent
2b411de1e3
commit
993c7899b6
17 changed files with 269 additions and 453 deletions
|
|
@ -6,3 +6,4 @@ export * from "./logo";
|
|||
export * from "./pro-icon";
|
||||
export * from "./count-chip";
|
||||
export * from "./activity";
|
||||
export * from "./switcher-label";
|
||||
|
|
|
|||
27
web/core/components/common/switcher-label.tsx
Normal file
27
web/core/components/common/switcher-label.tsx
Normal 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>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue