diff --git a/frontend/src/components/SetIcon.tsx b/frontend/src/components/SetIcon.tsx new file mode 100644 index 000000000..87dc1a2c8 --- /dev/null +++ b/frontend/src/components/SetIcon.tsx @@ -0,0 +1,24 @@ +import classnames from "classnames"; +import React from "react"; + +/** + * Renders a Keyrune MTG set-symbol glyph via the `ss ss-` classes Keyrune's CSS + * defines (stylesheet loaded globally in _document.tsx). Unlike CanonicalCardFilter.tsx, + * nothing here constrains rendering to a plain-string label, so this uses real markup + * instead of the embedded-PUA-character trick that component needs (see common/keyrune.ts). + * An expansion code Keyrune doesn't recognise falls back to its default `.ss:before` glyph + * automatically, since only the more specific `.ss-` rule is missing - no explicit + * fallback logic needed here. + */ +export const SetIcon = ({ + expansionCode, + className, +}: { + expansionCode: string; + className?: string; +}) => ( +