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",
"version": "0.125.0",
"version": "0.127.0",
"description": "Umami React components.",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",

View file

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

View file

@ -10,7 +10,7 @@ export function LinkHeader() {
const link = useLink();
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">
<Icon>
<ExternalLink />

View file

@ -10,7 +10,7 @@ export function PixelHeader() {
const pixel = usePixel();
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">
<Icon>
<ExternalLink />

View file

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

View file

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