@@ -10,7 +10,7 @@ class TraceRequiredPanel extends Component {
1010
1111 render ( ) {
1212 const { localize : _ } = this . context ;
13- const { children, ...rest } = this . props ;
13+ const { children, heading , beforeMessage , afterMessage , ...rest } = this . props ;
1414
1515 if ( ! this . props . visible ) {
1616 return null ;
@@ -19,12 +19,14 @@ class TraceRequiredPanel extends Component {
1919 return this . hasTrace ( ) ? (
2020 < LayoutPanel { ...rest } > { children } </ LayoutPanel >
2121 ) : (
22- < PanelEmpty heading = { _ ( "Looks like there aren't any traces defined yet." ) } >
22+ < PanelEmpty heading = { heading || _ ( "Looks like there aren't any traces defined yet." ) } >
23+ { beforeMessage && < p > { beforeMessage } </ p > }
2324 < p >
2425 { _ ( 'Go to the ' ) }
2526 < a onClick = { ( ) => this . context . setPanel ( 'Structure' , 'Traces' ) } > { _ ( 'Traces' ) } </ a >
2627 { _ ( ' panel under Structure to define traces.' ) }
2728 </ p >
29+ { afterMessage && < p > { afterMessage } </ p > }
2830 </ PanelEmpty >
2931 ) ;
3032 }
@@ -33,6 +35,9 @@ class TraceRequiredPanel extends Component {
3335TraceRequiredPanel . propTypes = {
3436 children : PropTypes . node ,
3537 visible : PropTypes . bool ,
38+ heading : PropTypes . string ,
39+ beforeMessage : PropTypes . string ,
40+ afterMessage : PropTypes . string ,
3641} ;
3742
3843TraceRequiredPanel . defaultProps = {
0 commit comments