Add measures tab

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Jonathan
2025-05-23 17:54:50 +02:00
committed by Sacha Al Himdani
parent fbfc3bb2b5
commit 1253145d3b
23 changed files with 1161 additions and 68 deletions

View File

@@ -70,23 +70,35 @@ export function Dialog({
);
}
export function DialogFooter({ children }: { children?: ReactNode }) {
export function DialogFooter({
children,
exitLabel,
}: {
children?: ReactNode;
exitLabel?: string;
}) {
const { __ } = useTranslate();
return (
<footer className="flex justify-end items-center p-3 border-t border-t-border-low gap-2">
<Close asChild>
<Button variant="secondary">{__("Cancel")}</Button>
<Button variant="secondary">{exitLabel ?? __("Cancel")}</Button>
</Close>
{children}
</footer>
);
}
export function DialogContent(props: HTMLAttributes<HTMLDivElement>) {
export function DialogContent(
props: HTMLAttributes<HTMLDivElement> & { padded?: boolean },
) {
return (
<div
{...props}
className={clsx("overflow-y-auto", props.className)}
className={clsx(
"overflow-y-auto",
props.className,
props.padded && "p-6",
)}
style={{
maxHeight: "min(640px, calc(100vh - 140px))",
}}