codeburn/app/renderer/components/Panel.tsx
iamtoruk 0eb0fd60d7 polish(app): spacing scale, unified insets, shared banner classes, scrollbar cues
- --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.
2026-07-16 04:02:21 -07:00

31 lines
766 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>
)
}