mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-01 20:35:09 +00:00
- --sp-1..7 scale; card headers unified on 10x14, bodies on 12x14; orphan gaps snapped to rungs - CapsuleChart's orphaned CSS deleted - StaleBanner/budget/empty/range notes moved from inline styles to plain.css classes; Panel bodyStyle prop retired (scroll-x class) - thin always-visible scrollbars on scrolling panels and overflow-x tables; Compare pickers flex below 760px instead of overflowing - one capitalization fix (loading quota…) 235/235, build green.
31 lines
766 B
TypeScript
31 lines
766 B
TypeScript
import type { ReactNode } from 'react'
|
||
|
||
/** Dash0-style card: optional `.phead` title strip + `.pbody` content. */
|
||
export function Panel({
|
||
title,
|
||
right,
|
||
rightLink,
|
||
className,
|
||
children,
|
||
}: {
|
||
title?: ReactNode
|
||
right?: ReactNode
|
||
/** Render the `right` slot as a lavender action link (`.r.link`, e.g. "See all ›"). */
|
||
rightLink?: boolean
|
||
className?: string
|
||
children?: ReactNode
|
||
}) {
|
||
return (
|
||
<div className={className ? `panel ${className}` : 'panel'}>
|
||
{title !== undefined && (
|
||
<div className="phead">
|
||
<b>{title}</b>
|
||
{right !== undefined && <span className={rightLink ? 'r link' : 'r'}>{right}</span>}
|
||
</div>
|
||
)}
|
||
<div className="pbody">
|
||
{children}
|
||
</div>
|
||
</div>
|
||
)
|
||
}
|