import { ChevronsLeft, ChevronsRight } from 'lucide-react'; import clsx from 'clsx'; import { isBE } from '@/react/portainer/feature-flags/feature-flags.service'; import smallLogo from '@/assets/ico/logomark.svg'; import { Link } from '@@/Link'; import fullLogoBE from './portainer_logo-BE.svg'; import fullLogoCE from './portainer_logo-CE.svg'; import { useSidebarState } from './useSidebarState'; import styles from './Header.module.css'; interface Props { logo?: string; } export function Header({ logo: customLogo }: Props) { const { toggle, isOpen } = useSidebarState(); return (
{isOpen && customLogo && (
Powered by {isBE ? ( 'portainer business' ) : ( portainer community )}
)}
); } function getLogo(isOpen: boolean, customLogo?: string) { if (customLogo) { return customLogo; } if (!isOpen) { return smallLogo; } return isBE ? fullLogoBE : fullLogoCE; } function Logo({ customLogo, isOpen, }: { customLogo?: string; isOpen: boolean; }) { const logo = getLogo(isOpen, customLogo); return ( Logo ); }