mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 13:50:35 +08:00
33 lines
641 B
JavaScript
33 lines
641 B
JavaScript
import React from 'react';
|
|
import Box from './Box';
|
|
import {Button} from 'coral-ui'
|
|
import styles from './styles.css';
|
|
|
|
export default class Footer extends React.Component {
|
|
constructor() {
|
|
super();
|
|
|
|
this.state = {
|
|
show: false
|
|
};
|
|
}
|
|
|
|
handleClick = () => {
|
|
this.setState(state => ({
|
|
show: !state.show
|
|
}))
|
|
}
|
|
|
|
render() {
|
|
const {show} = this.state;
|
|
return (
|
|
<div className={styles.container}>
|
|
<Button cStyle="darkGrey" onClick={this.handleClick}>
|
|
Show Comment Status
|
|
</Button>
|
|
{show ? <Box comment={this.props.comment} /> : null}
|
|
</div>
|
|
);
|
|
}
|
|
}
|