Files
community-rule/stories/asset/PatternGlyph.stories.js
T

79 lines
1.9 KiB
JavaScript

import PatternGlyph, {
PATTERN_GLYPH_OPTIONS,
PATTERN_GLYPH_SIZE_OPTIONS,
} from "../../app/components/asset/PatternGlyph";
export default {
title: "Components/Asset/PatternGlyph",
component: PatternGlyph,
parameters: {
layout: "centered",
docs: {
description: {
component:
"Pattern glyphs from the Structure Before Crisis zine. Paths use currentColor so a parent text class recolors the mark.",
},
},
},
argTypes: {
glyph: {
control: { type: "select" },
options: [...PATTERN_GLYPH_OPTIONS],
},
size: {
control: { type: "select" },
options: [...PATTERN_GLYPH_SIZE_OPTIONS],
},
className: { control: "text" },
title: { control: "text" },
description: { control: "text" },
},
};
export const Default = {
args: {
glyph: "lazy-consensus",
size: 48,
className: "text-[var(--color-content-default-primary)]",
},
};
export const Size24 = {
args: {
glyph: "open-participation",
size: 24,
className: "text-[var(--color-content-default-primary)]",
},
};
export const Recolor = {
args: {
glyph: "full-consensus",
size: 48,
className: "text-[var(--color-content-default-brand-primary)]",
},
};
export const InDiagram = {
args: {
glyph: "conflict-council",
size: 48,
className: "text-[var(--color-content-default-primary)]",
title: "Conflict council",
description: "Named members hear what the first steps could not settle.",
},
};
export const AllGlyphs = {
render: () => (
<div className="grid grid-cols-6 gap-4 text-[var(--color-content-default-primary)]">
{PATTERN_GLYPH_OPTIONS.map((glyph) => (
<div key={glyph} className="flex flex-col items-center gap-2">
<PatternGlyph glyph={glyph} size={48} />
<span className="text-xx-small-paragraph text-center">{glyph}</span>
</div>
))}
</div>
),
};