Skip to content

Instantly share code, notes, and snippets.

@omt66
Last active January 22, 2020 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omt66/b39b49d53034e78a99cf5d644874e9a0 to your computer and use it in GitHub Desktop.
Save omt66/b39b49d53034e78a99cf5d644874e9a0 to your computer and use it in GitHub Desktop.
export interface IPanelProps {
txt?: string
}
export class PanelDemo1 extends Component<IPanelDemoProps, {}> {
  render() {
    const { panelName } = this.props
    const selectedPanel = panelName === "panel1" ? <Panel1 /> : <Panel2 />
    return selectedPanel
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment