figbertmath

[RADIOACTIVE] miscellaneous math programs in website form
git clone git://git.figbert.com/figbertmath.git
Log | Files | Refs | README

modeSelect.js (1025B)


      1 import React from 'react';
      2 import PropTypes from 'prop-types';
      3 import { CalcOut } from "../lowLevel/calcOut";
      4 import { Pad } from "../lowLevel/pad";
      5 
      6 const values = [
      7         'basic',
      8         'angSize',
      9         'consecNum',
     10         'simultaneousEQ',
     11         'polyAng'
     12     ],
     13     displayValues = [
     14         'Simple Calculator',
     15         'Angular/Real Size',
     16         'Consecutive Number',
     17         'Simultaneous Equations',
     18         'Polygon Angles'
     19     ];
     20 
     21 export class ModeSelect extends React.Component {
     22     render() {
     23         return (
     24             <div>
     25                 <CalcOut mode={this.props.mode} />
     26                 <Pad
     27                     buttonValues={values}
     28                     displayValues={displayValues}
     29                     mode={this.props.mode}
     30                     onClick={this.props.onButtonPress}
     31                     style={{alignContent: 'center'}}
     32                     type={'large'}
     33                 />
     34             </div>
     35         );
     36     }
     37 }
     38 ModeSelect.propTypes = {
     39     mode: PropTypes.string.isRequired
     40 };