diff --git a/ui/src/notebooks/components/header/Buttons.tsx b/ui/src/notebooks/components/header/Buttons.tsx index 9e425517c6..86b3270145 100644 --- a/ui/src/notebooks/components/header/Buttons.tsx +++ b/ui/src/notebooks/components/header/Buttons.tsx @@ -1,14 +1,19 @@ +// Libraries import React, {FC, useContext, useCallback} from 'react' +// Contexts import {NotebookContext} from 'src/notebooks/context/notebook' import {TimeProvider, TimeContext, TimeBlock} from 'src/notebooks/context/time' import AppSettingProvider from 'src/notebooks/context/app' +// Components import TimeZoneDropdown from 'src/notebooks/components/header/TimeZoneDropdown' import TimeRangeDropdown from 'src/notebooks/components/header/TimeRangeDropdown' import AutoRefreshDropdown from 'src/notebooks/components/header/AutoRefreshDropdown' - import {SubmitQueryButton} from 'src/timeMachine/components/SubmitQueryButton' +import {IconFont} from '@influxdata/clockface' + +// Types import {RemoteDataState} from 'src/types' export interface TimeContextProps { @@ -44,6 +49,8 @@ const Buttons: FC = () => { void) } -type Props = StateProps & DispatchProps +interface OwnProps { + text?: string + icon?: IconFont + testID?: string +} + +type Props = OwnProps & StateProps & DispatchProps class SubmitQueryButton extends PureComponent { + public static defaultProps = { + text: 'Submit', + testID: 'time-machine-submit-button', + } + public render() { + const {text, icon, testID} = this.props + return (