in src/dialog/dialog.tsx [55:102]
public render() {
if (this.state.loading) {
return <Spinner size={SpinnerSize.large} />;
}
return (
<div>
<h2 className='query-name-heading'>{this.queryName}</h2>
{!this.state.notes.map((n) => n.level).includes('error') &&
<div className='query-area'>
<p>Caution: this is not guaranteed to work. Please heed any warnings below and test before use!</p>
<TextField
id='copyField'
multiline rows={8}
spellCheck={false}
defaultValue={this.state.oDataString}
componentRef={(textField) => { this.textField = textField; }}
/>
<div className='button-area'>
<PrimaryButton text={this.state.copied ? 'Copied.' : 'Copy query'}
className='button'
iconProps={{ iconName: this.state.copied ? 'CheckMark' : 'Copy' }}
onClick={() => this.copyClicked()}
/>
<PrimaryButton text='Open in new tab'
className='button'
iconProps={{ iconName: 'OpenInNewWindow' }}
onClick={() => this.openClicked()}
/>
</div>
</div>}
<div className='note-area'>
{this.state.notes.map((note, index) => {
return <MessageBar
key={index}
className='note-message-bar'
messageBarType={MessageBarType[note.level]}
isMultiline={false}
truncated={true}
overflowButtonAriaLabel='See more'
>
{note.message}
</MessageBar>;
})}
</div>
</div>
);
}