Files
cobble/src/components/general/logo.tsx
T
tben 9af5323530 Square off the rail header and add a back button
The rail header now sits in the standard 64px row with a hairline under
it, matching the pane headers, and shows the full logo off the chat
pages instead of the bare stone. A back button joins the conversation
and settings headers (workspace pages only for the conversation). The
rail's own back link and the dividers around it are switched off for now.

Also renames the bot and workspace Delete group to Danger Zone, lifts the
step budget to 50, and lets Logo render without its home link.
2026-10-22 08:30:51 +01:00

53 lines
1.3 KiB
TypeScript

import Row from "@moduletrace/twui/layout/Row";
import type Span from "@moduletrace/twui/layout/Span";
import type { ComponentProps } from "react";
import { twMerge } from "tailwind-merge";
import Stack from "@moduletrace/twui/layout/Stack";
import LogoIcon from "./logo-icon";
import Wordmark from "./wordmark";
type Props = {
icon_size?: number;
text_wrapper_props?: ComponentProps<typeof Stack>;
/**
* Only `className` applies: it sets the wordmark colour.
*/
text_props?: ComponentProps<typeof Span>;
no_link?: boolean;
};
/**
* Horizontal lockup: the ember stone beside the `cobble` wordmark.
*/
export default function Logo({
icon_size = 36,
text_props,
text_wrapper_props,
no_link,
}: Props) {
const content = (
<Row className="gap-2.5! flex-nowrap items-center">
<LogoIcon icon_size={icon_size} />
<Stack
{...text_wrapper_props}
className={twMerge("gap-0!", text_wrapper_props?.className)}
>
<Wordmark
height={Math.round(icon_size * 0.5)}
className={text_props?.className}
/>
</Stack>
</Row>
);
if (no_link) {
return content;
}
return (
<a href="/" className="logo-link">
{content}
</a>
);
}