mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-11-13 23:56:00 -06:00
Some checks failed
E2E Tests / e2e (push) Has been cancelled
E2E Tests / publish-docs-screenshots (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled
Co-authored-by: Kalle <38327916+Sendouc@users.noreply.github.com>
66 lines
1.3 KiB
TypeScript
66 lines
1.3 KiB
TypeScript
import clsx from "clsx";
|
|
import type * as React from "react";
|
|
import styles from "./ActivityPanel.module.css";
|
|
|
|
/** Content of an `ActivityButton`'s popover. */
|
|
export function ActivityPanel({
|
|
className,
|
|
children,
|
|
}: {
|
|
className?: string;
|
|
children: React.ReactNode;
|
|
}) {
|
|
return <div className={clsx(styles.panel, className)}>{children}</div>;
|
|
}
|
|
|
|
export function ActivityPanelHeader({
|
|
icon,
|
|
title,
|
|
titleClassName,
|
|
subtitle,
|
|
end,
|
|
}: {
|
|
icon?: React.ReactNode;
|
|
title: React.ReactNode;
|
|
titleClassName?: string;
|
|
subtitle?: React.ReactNode;
|
|
end?: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<div className={styles.header}>
|
|
{icon}
|
|
<div className={styles.titles}>
|
|
<span className={clsx(styles.title, titleClassName)}>{title}</span>
|
|
{subtitle ? <span className={styles.subtitle}>{subtitle}</span> : null}
|
|
</div>
|
|
{end}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
/** The panel's action row, separated from the content above it. */
|
|
export function ActivityPanelControls({
|
|
className,
|
|
children,
|
|
}: {
|
|
className?: string;
|
|
children: React.ReactNode;
|
|
}) {
|
|
return <div className={clsx(styles.controls, className)}>{children}</div>;
|
|
}
|
|
|
|
export function ActivityPanelSection({
|
|
title,
|
|
children,
|
|
}: {
|
|
title: string;
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<section className={styles.section}>
|
|
<h3 className={styles.sectionTitle}>{title}</h3>
|
|
{children}
|
|
</section>
|
|
);
|
|
}
|