diff --git a/site/src/components/PageHeader/PageHeader.tsx b/site/src/components/PageHeader/PageHeader.tsx index c839700c99..3ace2383ad 100644 --- a/site/src/components/PageHeader/PageHeader.tsx +++ b/site/src/components/PageHeader/PageHeader.tsx @@ -1,5 +1,5 @@ import type { FC, PropsWithChildren, ReactNode } from "react"; -import { Stack } from "../Stack/Stack"; +import { cn } from "utils/cn"; interface PageHeaderProps { actions?: ReactNode; @@ -14,36 +14,18 @@ export const PageHeader: FC = ({ }) => { return (
({ - display: "flex", - alignItems: "center", - paddingTop: 48, - paddingBottom: 48, - gap: 32, - - [theme.breakpoints.down("md")]: { - flexDirection: "column", - alignItems: "flex-start", - }, - })} + className={cn( + "flex items-start flex-col md:flex-row md:items-center", + "py-12 gap-8", + className, + )} data-testid="header" > -
{children}
+
{children}
{actions && ( - ({ - marginLeft: "auto", - - [theme.breakpoints.down("md")]: { - marginLeft: "initial", - width: "100%", - }, - })} - > +
{actions} - +
)}
); @@ -51,16 +33,7 @@ export const PageHeader: FC = ({ export const PageHeaderTitle: FC = ({ children }) => { return ( -

+

{children}

); @@ -73,20 +46,9 @@ interface PageHeaderSubtitleProps { export const PageHeaderSubtitle: FC = ({ children, - condensed, }) => { return ( -

({ - fontSize: 16, - color: theme.palette.text.secondary, - fontWeight: 400, - display: "block", - margin: 0, - marginTop: condensed ? 4 : 8, - lineHeight: "140%", - })} - > +

{children}

); @@ -94,15 +56,7 @@ export const PageHeaderSubtitle: FC = ({ export const PageHeaderCaption: FC = ({ children }) => { return ( - ({ - fontSize: 12, - color: theme.palette.text.secondary, - fontWeight: 600, - textTransform: "uppercase", - letterSpacing: "0.1em", - })} - > + {children} ); diff --git a/site/src/components/SettingsHeader/SettingsHeader.tsx b/site/src/components/SettingsHeader/SettingsHeader.tsx index 2f0f6a551c..7a5abad5dd 100644 --- a/site/src/components/SettingsHeader/SettingsHeader.tsx +++ b/site/src/components/SettingsHeader/SettingsHeader.tsx @@ -24,7 +24,9 @@ export const SettingsHeader: FC = ({ * we have a predictable max width for the header + description by * default. */} -
{children}
+
+ {children} +
{actions} ); @@ -48,7 +50,7 @@ export const SettingsHeaderDocsLink: FC = ({ ); }; -const titleVariants = cva("m-0 pb-1 flex items-center gap-2 leading-tight", { +const titleVariants = cva("m-0 flex items-center gap-2 leading-tight", { variants: { hierarchy: { primary: "text-3xl font-bold", @@ -100,7 +102,12 @@ export const SettingsHeaderDescription: FC = ({ className, }) => { return ( -

+

{children}

);