UNPKG

@grafana/ui

Version:
36 lines (35 loc) 1.36 kB
import React, { PureComponent } from 'react'; import { SelectableValue } from '@grafana/data'; import { GrafanaTheme } from '@grafana/data'; export declare const defaultIntervals: string[]; export interface Props { intervals?: string[]; onRefresh?: () => any; onIntervalChanged: (interval: string) => void; value?: string; tooltip?: string; hasLiveOption?: boolean; refreshButton?: React.ReactNode; buttonSelectClassName?: string; theme: GrafanaTheme; } export declare class RefreshPickerBase extends PureComponent<Props> { static offOption: { label: string; value: string; }; static liveOption: { label: string; value: string; }; static isLive: (refreshInterval?: string | undefined) => boolean; constructor(props: Props); intervalsToOptions: (intervals: string[] | undefined) => Array<SelectableValue<string>>; onChangeSelect: (item: SelectableValue<string>) => void; render(): JSX.Element; } export declare const RefreshPicker: React.FunctionComponent<Pick<Props, "value" | "tooltip" | "intervals" | "onRefresh" | "onIntervalChanged" | "hasLiveOption" | "refreshButton" | "buttonSelectClassName">> & { offOption: typeof RefreshPickerBase.offOption; liveOption: typeof RefreshPickerBase.liveOption; isLive: typeof RefreshPickerBase.isLive; };