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.
 
 
 

31 lines
858 B

import React, { Component } from 'react';
import ROOM_CAPACITY from '../App'
export default class activeButton extends Component {
render(){
switch (this.props.type) {
case 'register':
if(this.props.input != ''){
return(
<button>Let's play!</button>
)
} else {
return(
<button disabled>Enter a nickname to play.</button>
)
}
case 'createRoom':
if(this.props.passInput !== '' && 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 and capacity to create a room.</button>
)
}
}
}
}