import * as React from 'react'; import BlackList from './UI.BlackList'; import WhiteList from './UI.WhiteList'; import SwitchMode from './SwitchMode' export default class Component extends React.Component { constructor(props: any) { super(props); this.state = { radioValue: 'white' }; } radioChange = (value: string) => { this.setState({ radioValue: value }) } render() { const { radioValue } = this.state; return (
{radioValue === 'black' && } {radioValue === 'white' && } {radioValue === 'filter' && }
); } }