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.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import Button from "@moduletrace/twui/layout/Button";
|
||||
import { ChevronLeft, type LucideIcon } from "lucide-react";
|
||||
|
||||
/**
|
||||
* Back Button
|
||||
*/
|
||||
export default function BackButton() {
|
||||
return (
|
||||
<Button
|
||||
title="Back Button"
|
||||
// variant="ghost"
|
||||
color="gray"
|
||||
onClick={() => {
|
||||
window.history.back();
|
||||
}}
|
||||
className="p-2! w-9 min-w-9 h-9"
|
||||
>
|
||||
<ChevronLeft size={20} />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
@@ -13,6 +13,7 @@ type Props = {
|
||||
* Only `className` applies: it sets the wordmark colour.
|
||||
*/
|
||||
text_props?: ComponentProps<typeof Span>;
|
||||
no_link?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -22,21 +23,30 @@ 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">
|
||||
<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>
|
||||
{content}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user