import React from 'react'; import styled from 'styled-components'; import type { JSX } from 'react'; export type SidebarLogoProps = { imageUrl?: string; href?: string; altText?: string; dataTestId?: string; backgroundColor?: string; className?: string; }; export function SidebarLogo({ imageUrl, href, altText, backgroundColor, dataTestId, className, }: SidebarLogoProps = {}): JSX.Element | null { if (!imageUrl) { return null; } const logo = ; return ( {href ? {logo} : logo} ); } const LogoImgEl = styled.img` max-height: var(--sidebar-logo-max-height); max-width: var(--sidebar-logo-max-width); padding: var(--sidebar-logo-padding); width: 100%; display: block; `; const LogoWrap = styled.div` text-align: center; line-height: 0; `; const Link = styled.a` display: inline-block; `;