mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 17:51:53 +08:00
33 lines
673 B
JavaScript
33 lines
673 B
JavaScript
import React from 'react';
|
|
import Box from './Box';
|
|
import {Button} from 'plugin-api/beta/client/components/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>
|
|
);
|
|
}
|
|
}
|