import React, { MouseEvent } from 'react'; import SButton from '@components/SButton'; import Mask from './mask'; interface Props { } interface State { box1Visible: boolean; } /** * http://reactcommunity.org/react-transition-group/css-transition */ class Page extends React.Component { constructor(props: Props) { super(props); this.state = { box1Visible: false }; this.handleShowBox1 = this.handleShowBox1.bind(this); this.hideMask = this.hideMask.bind(this); } render() { const { box1Visible } = this.state; return (

hello

footer
); } handleShowBox1() { console.log('click'); this.setState({ box1Visible: !this.state.box1Visible }); } hideMask(v: boolean) { this.setState({ box1Visible: !v }); } } export default Page;