Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class Game extends Compoent {
renderActions() {
const { history } = this.state;
const selectedCell = this.getSelectedCell();
const prefilled = selectedCell && selectedCell.get('prefilled');
return (
<div className="actions">
<div className="action" onClick={history.size ? this.undo : null}>
<ReloadIcon />Undo
<div className="action redo" onClick={history.size ? this.redo : null}>
<ReloadIcon />Redo
<div className="action" onClick={!prefilled ? this.eraseSelected : null}>
<RemoveIcon />Erase
onClick={!prefilled ?
this.fillSelectedWithSolution : null}
<LoupeIcon />Hint
<style jsx>{ActionsStyle}</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.