Add computer settings pages and restore workspace pages
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { ReactNode } from "react";
|
||||
import Row from "@moduletrace/twui/layout/Row";
|
||||
import Stack from "@moduletrace/twui/layout/Stack";
|
||||
import H1 from "@moduletrace/twui/layout/H1";
|
||||
@@ -6,13 +7,21 @@ import Span from "@moduletrace/twui/layout/Span";
|
||||
type Props = {
|
||||
title: string;
|
||||
description: string;
|
||||
/**
|
||||
* Controls at the end of the header, e.g. a settings link.
|
||||
*/
|
||||
action?: ReactNode;
|
||||
};
|
||||
|
||||
/**
|
||||
* Same 64px header as a conversation, so moving between bots and settings
|
||||
* doesn't shift the page.
|
||||
*/
|
||||
export default function SettingsPaneHeader({ title, description }: Props) {
|
||||
export default function SettingsPaneHeader({
|
||||
title,
|
||||
description,
|
||||
action,
|
||||
}: Props) {
|
||||
return (
|
||||
<Row className="h-16 shrink-0 gap-3! flex-nowrap items-center px-6 border-0 border-b border-solid border-hairline">
|
||||
<Stack className="min-w-0 gap-0!">
|
||||
@@ -23,6 +32,11 @@ export default function SettingsPaneHeader({ title, description }: Props) {
|
||||
{description}
|
||||
</Span>
|
||||
</Stack>
|
||||
{action ? (
|
||||
<Row className="ml-auto shrink-0 gap-1! flex-nowrap justify-end">
|
||||
{action}
|
||||
</Row>
|
||||
) : null}
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user