import React from "react"; import { THEME } from "../../types"; import { tokens } from "../../style-dictionary/dist/tokens"; import { Svg, SvgProps } from "../Svg"; const WIDTH = 165; const HEIGHT = 32; const RATIO: number = WIDTH / HEIGHT; const widthFromHeight = (height: number) => Math.ceil(height * RATIO); export interface ConveyorLogoProps extends SvgProps { height?: number; monochrome?: boolean; theme?: THEME; variant?: "icon" | "wordmark"; color?: string; } export const ConveyorLogo = React.forwardRef( ( { height = HEIGHT, monochrome = false, theme = THEME.PRODUCT, variant = "wordmark", color, className, ...rest }, ref, ) => { const wordmarkColor = { brand: tokens.color.white, product: tokens.color.brandBlack, }; const iconColorFunction = () => { if (monochrome && theme === THEME.PRODUCT) { return color || tokens.color.brandBlack; } if (monochrome && theme === THEME.BRAND) { return color || tokens.color.white; } return tokens.color.brandGreen[400]; }; const iconColor = iconColorFunction(); return ( {variant === "wordmark" && ( <> )} {variant === "icon" && ( <> )} ); }, );