79 lines
1.8 KiB
JavaScript
79 lines
1.8 KiB
JavaScript
import DiagramGlyph, {
|
|
DIAGRAM_GLYPH_OPTIONS,
|
|
DIAGRAM_GLYPH_SIZE_OPTIONS,
|
|
} from "../../app/components/asset/DiagramGlyph";
|
|
|
|
export default {
|
|
title: "Components/Asset/DiagramGlyph",
|
|
component: DiagramGlyph,
|
|
parameters: {
|
|
layout: "centered",
|
|
docs: {
|
|
description: {
|
|
component:
|
|
"Diagram glyphs from Asset / Diagram Glyph. Paths use currentColor so a parent text class recolors the mark.",
|
|
},
|
|
},
|
|
},
|
|
argTypes: {
|
|
glyph: {
|
|
control: { type: "select" },
|
|
options: [...DIAGRAM_GLYPH_OPTIONS],
|
|
},
|
|
size: {
|
|
control: { type: "select" },
|
|
options: [...DIAGRAM_GLYPH_SIZE_OPTIONS],
|
|
},
|
|
className: { control: "text" },
|
|
title: { control: "text" },
|
|
description: { control: "text" },
|
|
},
|
|
};
|
|
|
|
export const Default = {
|
|
args: {
|
|
glyph: "group",
|
|
size: 48,
|
|
className: "text-[var(--color-content-default-primary)]",
|
|
},
|
|
};
|
|
|
|
export const Size24 = {
|
|
args: {
|
|
glyph: "vote",
|
|
size: 24,
|
|
className: "text-[var(--color-content-default-primary)]",
|
|
},
|
|
};
|
|
|
|
export const Recolor = {
|
|
args: {
|
|
glyph: "consensus",
|
|
size: 48,
|
|
className: "text-[var(--color-content-default-brand-primary)]",
|
|
},
|
|
};
|
|
|
|
export const InDiagram = {
|
|
args: {
|
|
glyph: "rotation",
|
|
size: 48,
|
|
className: "text-[var(--color-content-default-primary)]",
|
|
title: "Rotation",
|
|
description: "Roles move on a set schedule so no one keeps the keys.",
|
|
},
|
|
};
|
|
|
|
export const AllGlyphs = {
|
|
render: () => (
|
|
<div className="grid grid-cols-6 gap-4 text-[var(--color-content-default-primary)]">
|
|
{DIAGRAM_GLYPH_OPTIONS.map((glyph) => (
|
|
<div key={glyph} className="flex flex-col items-center gap-2">
|
|
<DiagramGlyph glyph={glyph} size={48} />
|
|
<span className="text-xx-small-paragraph">{glyph}</span>
|
|
</div>
|
|
))}
|
|
</div>
|
|
),
|
|
};
|