unicornpaint

A web-based painting app for raspberry PI and pimoroni Unicorn Hat HD
Log | Files | Refs | README

LoadDialog.js (637B)


      1 import React, { Component } from 'react'
      2 import { ModalContainer, ModalDialog } from 'react-modal-dialog'
      3 
      4 export default class LoadDialog extends Component {
      5     render() {
      6         let savesListItems = this.props.saves.map((save) => {
      7             return <a key={save} onClick={() => this.props.onLoad(save)}>
      8                 <li>{save}</li>
      9             </a>
     10         })
     11 
     12         return <ModalContainer onClose={this.props.onClose}>
     13             <ModalDialog onClose={this.props.onClose}>
     14             <h1>Load</h1>
     15             <ul>
     16             {savesListItems}
     17             </ul>
     18             </ModalDialog>
     19         </ModalContainer>
     20     }
     21 }