@grafana/ui
Version:
Grafana Components Library
28 lines (27 loc) • 1.04 kB
TypeScript
import { HTMLAttributes } from 'react';
import { SelectableValue } from '@grafana/data';
import { ToolbarButtonVariant } from '../ToolbarButton/ToolbarButton';
import { PopoverContent } from '../Tooltip/types';
export interface Props<T> extends HTMLAttributes<HTMLButtonElement> {
className?: string;
options: Array<SelectableValue<T>>;
value?: SelectableValue<T>;
onChange: (item: SelectableValue<T>) => void;
/** @deprecated use tooltip instead, tooltipContent is not being processed in ToolbarButton*/
tooltipContent?: PopoverContent;
narrow?: boolean;
variant?: ToolbarButtonVariant;
tooltip?: string;
root?: HTMLElement;
}
/**
* @deprecated Use Combobox or Dropdown instead
*
* https://developers.grafana.com/ui/latest/index.html?path=/docs/inputs-deprecated-buttonselect--docs
*/
declare const ButtonSelectComponent: {
<T>(props: Props<T>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export declare const ButtonSelect: typeof ButtonSelectComponent;
export {};