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.

16 lines (15 loc) 532 B
import { jsx as _jsx } from "@zsnout/ithkuil-jsx/jsx-runtime"; /** * Creates an SVG element that blinks. * * @param props Properties modifying the animation. * @returns An `SVGGElement` which starts hidden, then blinks in or out every * `props.interval` milliseconds. */ export function Blink(props) { const g = (_jsx("g", { opacity: 0, children: props.children })); setInterval(() => { g.setAttribute("opacity", g.getAttribute("opacity") == "0" ? "1" : "0"); }, props.interval ?? 1000); return g; }