Tag's icon prop does not accept a PrimeIcons class-name string the way Button's does — passing one renders it as literal text instead of an icon.
Expected
Button (Common/Button.js) has a renderIcon helper:
const renderIcon = (icon) => typeof icon === 'string' ? jsx("i", { className: icon, "aria-hidden": 'true' }) : icon;
so <Button icon='pi pi-user' /> renders a proper <i className="pi pi-user"> icon. Tag's own JSDoc says it exists specifically to restore the PrimeReact-10-era authoring ergonomics on top of PrimeReact 11, matching Button's stated purpose.
Actual
Tag (Display/Tag.js) passes icon straight through as a child with no conversion:
const Tag = ({ value, severity, rounded, icon, className, children }) => (jsxs(Tag$1, { severity, rounded, className, "data-severity": severity, children: [icon, value ?? children] }));
<Tag value="Member" severity="success" icon="pi pi-user" /> renders the literal text pi pi-userMember — the icon class name is printed as a text node instead of becoming an icon.
Repro
import { Tag } from '@cratis/components/Display';
<Tag value="Member" severity="success" icon="pi pi-user" />
Expected: a green pill with a person icon followed by "Member".
Actual: a green pill containing the literal text "pi pi-userMember".
Why it matters
Every call site written against Tag's documented authoring model (a plain PrimeIcons class-name string, matching Button's) silently breaks in this exact way — no type error, no console warning, since icon?: React.ReactNode accepts a string just fine. Only a live render exposes it. Badge (Display/Badge.js) has the identical icon-less-conversion shape as Tag (no icon prop at all there, so not directly affected, but worth checking for the same class of gap if one is ever added).
Version: @cratis/components@3.5.0.
Tag'siconprop does not accept a PrimeIcons class-name string the wayButton's does — passing one renders it as literal text instead of an icon.Expected
Button(Common/Button.js) has arenderIconhelper:so
<Button icon='pi pi-user' />renders a proper<i className="pi pi-user">icon.Tag's own JSDoc says it exists specifically to restore the PrimeReact-10-era authoring ergonomics on top of PrimeReact 11, matchingButton's stated purpose.Actual
Tag(Display/Tag.js) passesiconstraight through as a child with no conversion:<Tag value="Member" severity="success" icon="pi pi-user" />renders the literal textpi pi-userMember— the icon class name is printed as a text node instead of becoming an icon.Repro
Expected: a green pill with a person icon followed by "Member".
Actual: a green pill containing the literal text "pi pi-userMember".
Why it matters
Every call site written against
Tag's documented authoring model (a plain PrimeIcons class-name string, matchingButton's) silently breaks in this exact way — no type error, no console warning, sinceicon?: React.ReactNodeaccepts a string just fine. Only a live render exposes it.Badge(Display/Badge.js) has the identicalicon-less-conversion shape asTag(noiconprop at all there, so not directly affected, but worth checking for the same class of gap if one is ever added).Version:
@cratis/components@3.5.0.