feat: release Colour Tools 0.1.0

This commit is contained in:
2026-08-31 21:21:35 +02:00
commit 0c1fc94b58
100 changed files with 17406 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import type { CSSProperties, ReactNode } from "react";
export function Swatch({
colour,
label,
detail,
actions,
large = false,
}: {
colour: string;
label: string;
detail?: string;
actions?: ReactNode;
large?: boolean;
}) {
return (
<article className={`swatch-card${large ? " swatch-card--large" : ""}`}>
<div
className="swatch-colour checkerboard"
style={{ "--swatch": colour } as CSSProperties}
aria-label={`${label}: ${detail ?? colour}`}
/>
<div className="swatch-meta">
<strong>{label}</strong>
<code>{detail ?? colour}</code>
</div>
{actions && <div className="swatch-actions">{actions}</div>}
</article>
);
}