import { h, Component } from 'preact' export default class ButtonGrid extends Component { state = { x: 0, y: 0, } render() { const { x: _x, y: _y, } = this.state const { x: X, y: Y, max = Infinity, onClick, onHover, } = this.props return (
| {" "} | {X.map(x => ({x} | ))}
|---|---|
| {y} | {X.map(x => ({x * y > max ? " " : } | ))}