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 => ( ))} {Y.map(y => ( {X.map(x => ( ))} ))}
{" "}{x}
{y} {x * y > max ? " " : }
) } }