// @flow import React, { Component } from 'react'; import { FormattedMessage as Message } from 'react-intl'; import classNames from 'classnames'; import profileForm from 'components/profile/profileForm.scss'; import messages from '../MultiFactorAuth.intl.json'; 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'; export default class Instructions extends Component< {}, { activeOs: null | 'android' | 'ios' | 'windows', }, > { state: { activeOs: null | 'android' | 'ios' | 'windows', } = { activeOs: null, }; render() { const { activeOs } = this.state; return (

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