import React from 'react'; import classNames from 'classnames'; interface Props { active: boolean; } interface State { active: boolean; } export class SessionToggle extends React.PureComponent { public static readonly extendedDefaults = { onClick: () => null, }; constructor(props: any) { super(props); this.clickHandler = this.clickHandler.bind(this); const { active } = this.props; this.state = { active: active, }; } public render() { return (
); } private clickHandler() { this.setState({ active: !this.state.active, }); } }