UNPKG

@zsnout/ithkuil

Version:

A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.

17 lines (16 loc) 597 B
import { jsx as _jsx } from "@zsnout/ithkuil-jsx/jsx-runtime"; import { Translate } from "./translate.js"; /** * Shows a spread of several items. * * @param props Properties modifying the spread. * @returns An `SVGGElement` containing all the items. */ export function Spread(props) { const g = (_jsx("g", {})); const columns = props.columns ?? 5; for (let index = 0; index < props.items.length; index++) { g.append(_jsx(Translate, { x: (index % columns) * (props.x ?? 100), y: (index / columns) * (props.y ?? 100), children: props.items[index] })); } return g; }