import * as React from 'react' ; import EditorPaneCollapsed from './EditorPaneCollapsed' ; import EditorPaneExpanded from './EditorPaneExpanded' ; interface IEditorPaneProps { isExpanded : boolean ; } export const EditorPane = ( props ) => ( < > < section > { getEditorPaneContent ( props . isExpanded ) } < /section> < />); export default EditorPane ; const getEditorPaneContent = ( isExpanded ) => isExpanded ? < EditorPaneExpanded /> : <EditorPaneCollapsed / > ;