Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/web/src/assets/recipe-fallback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/web/src/components/brand/LogoMark/LogoMark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@layer components {
.brand-logo-mark {
display: block;
flex: none;

color: var(--color-brand-primary);
}
}
86 changes: 86 additions & 0 deletions apps/web/src/components/brand/LogoMark/LogoMark.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import type { CSSProperties, SVGProps } from 'react';

import './LogoMark.css';

export interface LogoMarkProps
extends Omit<SVGProps<SVGSVGElement>, 'color' | 'width' | 'height'> {
/** Square rendered size. Numbers are treated as CSS pixels. */
size?: number | string;

/**
* Explicit logo color override.
*
* The default comes from LogoMark.css and uses --color-brand-primary.
*/
color?: string;

/**
* Optional accessible title when the mark itself needs an accessible name.
* Leave unset when nearby visible text already names the application.
*/
title?: string;
}

/**
* Recipe application brand mark.
*
* This is intentionally separate from src/icons: it is brand artwork rather
* than a reusable interface icon. The geometry uses currentColor so the mark
* can use the normal brand color by default and inherit/override color when
* needed (for example, an inverse header treatment later).
*/
export default function LogoMark({
size = '2rem',
color,
title,
className,
style,
...svgProps
}: LogoMarkProps) {
const isLabelled = Boolean(
title || svgProps['aria-label'] || svgProps['aria-labelledby'],
);

const classes = ['brand-logo-mark', className].filter(Boolean).join(' ');

const logoStyle: CSSProperties = {
...style,
...(color ? { color } : {}),
};

return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 576 576"
width={size}
height={size}
fill="currentColor"
focusable="false"
role={isLabelled ? 'img' : undefined}
aria-hidden={isLabelled ? undefined : true}
className={classes}
style={logoStyle}
{...svgProps}
>
{title ? <title>{title}</title> : null}

<circle
cx="288"
cy="291"
r="216"
fill="none"
stroke="currentColor"
strokeWidth="28"
/>

{/* Fork: three rounded tines, a curved shoulder, and one handle. */}
<rect x="160" y="163" width="30" height="119" rx="15" />
<rect x="202" y="163" width="30" height="119" rx="15" />
<rect x="245" y="163" width="30" height="119" rx="15" />
<path d="M160 270h115v7c0 25-16 44-42 52v163h-31V329c-26-8-42-27-42-52v-7Z" />

{/* Spoon: broad bowl tapering into a straight handle. */}
<path d="M363 162c-40 0-72 39-72 89 0 42 20 71 49 83 5 2 7 6 7 12v146h32V346c0-6 2-10 7-12 29-12 49-41 49-83 0-50-32-89-72-89Z" />
</svg>
);
}
Loading
Loading