mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Better display of epochs
This commit is contained in:
parent
bea445bafa
commit
e3129032e8
8 changed files with 216 additions and 70 deletions
|
@ -0,0 +1,35 @@
|
|||
import clsx from "clsx";
|
||||
import { EventEpoch } from "../../engine/engine";
|
||||
|
||||
interface EpochCellProps {
|
||||
noLeadingText?: boolean;
|
||||
epoch: EventEpoch;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const EPOCH_STYLES_ARRAY = [
|
||||
"text-slate-900",
|
||||
"font-mono",
|
||||
"bg-slate-200",
|
||||
"p-1",
|
||||
"py-0",
|
||||
"rounded-sm",
|
||||
"ring-1",
|
||||
"ring-slate-500",
|
||||
"text-sm",
|
||||
];
|
||||
|
||||
export const EPOCH_STYLES = clsx(...EPOCH_STYLES_ARRAY);
|
||||
|
||||
export default function EpochCell({
|
||||
epoch,
|
||||
className,
|
||||
noLeadingText,
|
||||
}: EpochCellProps) {
|
||||
return (
|
||||
<div className={clsx(EPOCH_STYLES, className)}>
|
||||
{noLeadingText ? "" : "Epoch "}
|
||||
{epoch}
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue