import { colors } from '@0xproject/react-shared'; import { Card, CardHeader, CardText } from 'material-ui/Card'; import * as React from 'react'; export interface QuestionProps { prompt: string; answer: React.ReactNode; shouldDisplayExpanded: boolean; } interface QuestionState { isExpanded: boolean; } export class Question extends React.Component { constructor(props: QuestionProps) { super(props); this.state = { isExpanded: props.shouldDisplayExpanded, }; } public render(): React.ReactNode { return (
{this.props.answer}
); } private _onExchangeChange(): void { this.setState({ isExpanded: !this.state.isExpanded, }); } }