Extract shared DetailPopover shell from spell popovers. Normalize weapon/consumable/equipment/armor items from Foundry data into mundane (Items line) and detailed (Equipment section with clickable popovers). Scrolls/wands show embedded spell info. Bump IDB cache v7. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
547 B
TypeScript
21 lines
547 B
TypeScript
import { cn } from "../lib/utils.js";
|
|
|
|
/**
|
|
* Renders text containing safe HTML formatting tags (strong, em, ul, ol, li)
|
|
* preserved by the stripFoundryTags pipeline. All other HTML is already
|
|
* stripped before reaching this component.
|
|
*/
|
|
export function RichDescription({
|
|
text,
|
|
className,
|
|
}: Readonly<{ text: string; className?: string }>) {
|
|
const props = {
|
|
className: cn(
|
|
"[&_ol]:list-decimal [&_ol]:pl-4 [&_ul]:list-disc [&_ul]:pl-4",
|
|
className,
|
|
),
|
|
dangerouslySetInnerHTML: { __html: text },
|
|
};
|
|
return <div {...props} />;
|
|
}
|