diff --git a/src/components/containers/TraceRequiredPanel.js b/src/components/containers/TraceRequiredPanel.js index 61b352147..e5f538e3b 100644 --- a/src/components/containers/TraceRequiredPanel.js +++ b/src/components/containers/TraceRequiredPanel.js @@ -10,23 +10,21 @@ class TraceRequiredPanel extends Component { render() { const {localize: _} = this.context; - const {children, heading, beforeMessage, afterMessage, forceEmpty, ...rest} = this.props; + const {children, ...rest} = this.props; if (!this.props.visible) { return null; } - return !forceEmpty && this.hasTrace() ? ( + return this.hasTrace() ? ( {children} ) : ( - - {beforeMessage &&

{beforeMessage}

} +

{_('Go to the ')} this.context.setPanel('Structure', 'Traces')}>{_('Traces')} {_(' panel under Structure to define traces.')}

- {afterMessage &&

{afterMessage}

}
); } @@ -35,10 +33,6 @@ class TraceRequiredPanel extends Component { TraceRequiredPanel.propTypes = { children: PropTypes.node, visible: PropTypes.bool, - heading: PropTypes.string, - beforeMessage: PropTypes.string, - afterMessage: PropTypes.string, - forceEmpty: PropTypes.bool, }; TraceRequiredPanel.defaultProps = { diff --git a/src/components/containers/index.js b/src/components/containers/index.js index 926611282..1d1212e32 100644 --- a/src/components/containers/index.js +++ b/src/components/containers/index.js @@ -9,6 +9,7 @@ import PlotlyFold, {Fold} from './PlotlyFold'; import MenuPanel from './MenuPanel'; import PlotlyPanel, {Panel} from './PlotlyPanel'; import PlotlySection, {Section} from './PlotlySection'; +import PanelEmpty from './PanelEmpty'; import SubplotAccordion from './SubplotAccordion'; import TraceAccordion from './TraceAccordion'; import TransformAccordion from './TransformAccordion'; @@ -31,6 +32,7 @@ export { Fold, PlotlyPanel, Panel, + PanelEmpty, PlotlySection, Section, SubplotAccordion, diff --git a/src/components/index.js b/src/components/index.js index 3e58fd79d..58aee0874 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -73,6 +73,7 @@ import { LayoutSection, Panel, PlotlyPanel, + PanelEmpty, PlotlySection, Section, SubplotAccordion, @@ -140,6 +141,7 @@ export { Text, PlotlyPanel, Panel, + PanelEmpty, PanelMenuWrapper, Radio, PlotlySection, diff --git a/src/index.js b/src/index.js index f790edbe0..9d373003c 100644 --- a/src/index.js +++ b/src/index.js @@ -63,6 +63,7 @@ import { Text, PlotlyPanel, Panel, + PanelEmpty, PanelMenuWrapper, Radio, PlotlySection, @@ -136,6 +137,7 @@ export { Text, PlotlyPanel, Panel, + PanelEmpty, PanelMenuWrapper, Radio, PlotlySection,