import { css } from '@emotion/css'; import React, { PropsWithChildren, ReactElement } from 'react'; import { GrafanaTheme, SelectableValue } from '@grafana/data'; import { InlineFormLabel, Select, useStyles } from '@grafana/ui'; import { useUniqueId } from 'app/plugins/datasource/influxdb/components/useUniqueId'; interface VariableSelectFieldProps { name: string; value: SelectableValue; options: Array>; onChange: (option: SelectableValue) => void; tooltip?: string; testId?: string; width?: number; labelWidth?: number; } export function VariableSelectField({ name, value, options, tooltip, onChange, testId, width, labelWidth, }: PropsWithChildren>): ReactElement { const styles = useStyles(getStyles); const uniqueId = useUniqueId(); const inputId = `variable-select-input-${name}-${uniqueId}`; return ( <> {name}