/** * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal */ import * as React from 'react'; export class ControlGroup extends React.Component<{ header: string, initialExpanded?: boolean }, { isExpanded: boolean }> { state = { isExpanded: !!this.props.initialExpanded } toggleExpanded = () => this.setState({ isExpanded: !this.state.isExpanded }); render() { return
{this.state.isExpanded &&
{this.props.children}
}
} } // export const ToggleButton = (props: { // onChange: (v: boolean) => void, // value: boolean, // label: string, // title?: string // }) =>
// {props.label} //
// //
//