Added label to PageHeader. Style fixes.
Some checks are pending
Create docker images / Build, push, and deploy (push) Waiting to run
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run

This commit is contained in:
Mike Cao 2025-09-24 00:07:17 -07:00
parent 8115709a8b
commit 27c342811e
6 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "@umami/components", "name": "@umami/components",
"version": "0.125.0", "version": "0.127.0",
"description": "Umami React components.", "description": "Umami React components.",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",

View file

@ -69,7 +69,7 @@ export function SideNav(props: SidebarProps) {
<SidebarItem <SidebarItem
label={label} label={label}
icon={icon} icon={icon}
isSelected={pathname.endsWith(path)} isSelected={pathname.includes(path)}
role="button" role="button"
/> />
</Link> </Link>

View file

@ -10,7 +10,7 @@ export function LinkHeader() {
const link = useLink(); const link = useLink();
return ( return (
<PageHeader title={link.name} description={link.url} icon={<Link />}> <PageHeader title={link.name} description={link.url} icon={<Link />} marginBottom="3">
<LinkButton href={getSlugUrl(link.slug)} target="_blank"> <LinkButton href={getSlugUrl(link.slug)} target="_blank">
<Icon> <Icon>
<ExternalLink /> <ExternalLink />

View file

@ -10,7 +10,7 @@ export function PixelHeader() {
const pixel = usePixel(); const pixel = usePixel();
return ( return (
<PageHeader title={pixel.name} description={pixel.slug} icon={<Grid2x2 />}> <PageHeader title={pixel.name} icon={<Grid2x2 />} marginBottom="3">
<LinkButton href={getSlugUrl(pixel.slug)} target="_blank"> <LinkButton href={getSlugUrl(pixel.slug)} target="_blank">
<Icon> <Icon>
<ExternalLink /> <ExternalLink />

View file

@ -14,7 +14,7 @@ export function WebsitesPage() {
return ( return (
<PageBody> <PageBody>
<Column gap="6" margin="2"> <Column gap="6" margin="2">
<PageHeader title={formatMessage(labels.websites)} label={'back'} description={'Websites'}> <PageHeader title={formatMessage(labels.websites)}>
<WebsiteAddButton teamId={teamId} /> <WebsiteAddButton teamId={teamId} />
</PageHeader> </PageHeader>
<Panel> <Panel>

View file

@ -38,7 +38,11 @@ export function PageHeader({
)} )}
{title && <Heading size="4">{title}</Heading>} {title && <Heading size="4">{title}</Heading>}
</Row> </Row>
{description && <Text color="muted">{description}</Text>} {description && (
<Text color="muted" truncate style={{ maxWidth: 600 }} title={description}>
{description}
</Text>
)}
</Column> </Column>
<Row justifyContent="flex-end">{children}</Row> <Row justifyContent="flex-end">{children}</Row>
</Row> </Row>