@brendonhudnell/react-hexgrid
Version:
Interactive hexagon grids with React bindings
7 lines (6 loc) • 464 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import Point from './models/Point';
function Pattern({ id, link, size = new Point(10, 10) }) {
return (_jsx("defs", { children: _jsx("pattern", Object.assign({ id: id, patternUnits: "objectBoundingBox", x: 0, y: 0, width: size.x, height: size.y }, { children: _jsx("image", { xlinkHref: link, x: 0, y: 0, width: size.x * 2, height: size.y * 2 }, void 0) }), void 0) }, void 0));
}
export default Pattern;