not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
1.1 KiB

import React, { Component } from 'react';
import App from '../App'
export default class activeButton extends Component {
render(){
switch (this.props.type) {
case 'register':
if(this.props.input != ''){
return(
<button className="button__top">Let's play!</button>
)
} else {
return(
<button className="button__top" disabled>Enter a nickname to play.</button>
)
}
case 'createRoom':
if(this.props.capacityInput !== '' && this.props.capacityInput <= 25 && this.props.capacityInput>=2 && this.props.capacityInput.length <= 2){
return(
<button>Create Room</button>
)
} else {
return(
<button disabled>Enter password (optional) and capacity to create a room.</button>
)
}
case 'inputWord':
if(this.props.input != '' && this.props.input <= 20){
return(
<button>Submit my answer!</button>
)
} else {
return(
<button disabled>Enter a term!</button>
)
}
}
}
}