UNPKG

react-honeycomb

Version:

A library for displaying lists as honeycombs with hexagonal cells in React applications

14 lines (13 loc) 491 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const HoneycombCell = ({ children, row, column, }) => { const transform = row % 2 ? `translateX(25%)` : `translateX(-25%)`; return (React.createElement("li", { style: { gridRow: `${row} / span 4`, gridColumn: `${column} / span 4`, pointerEvents: "none", transform, } }, children)); }; exports.default = HoneycombCell;