import React from 'react'; import { FormattedMessage as Message } from 'react-intl'; import clsx from 'clsx'; import profileForm from '../../profileForm.scss'; import messages from '../instructions.intl'; import OsInstruction from './OsInstruction'; import OsTile from './OsTile'; import styles from './instructions.scss'; import androidLogo from './images/android.svg'; import appleLogo from './images/apple.svg'; import windowsLogo from './images/windows.svg'; interface State { activeOs: null | 'android' | 'ios' | 'windows'; } export default class Instructions extends React.Component<{}, State> { state: State = { activeOs: null, }; render() { const { activeOs } = this.state; return (

this.onChangeOs(event, 'android')} /> this.onChangeOs(event, 'ios')} /> this.onChangeOs(event, 'windows')} />
{activeOs ? : null}
); } onChangeOs(event: React.MouseEvent, osName: 'android' | 'ios' | 'windows') { event.preventDefault(); this.setState({ activeOs: this.state.activeOs === osName ? null : osName, }); } }