import { useId } from '@react-aria/utils'; import { FormEvent, PropsWithChildren } from 'react'; import * as React from 'react'; import { Field, Input } from '@grafana/ui'; interface VariableTextFieldProps { value?: string; defaultValue?: string; name: string; placeholder?: string; onChange?: (event: FormEvent) => void; testId?: string; required?: boolean; width?: number; grow?: boolean; onBlur?: (event: FormEvent) => void; maxLength?: number; description?: React.ReactNode; invalid?: boolean; error?: React.ReactNode; } export function VariableTextField({ value, defaultValue, name, placeholder = '', onChange, testId, width, required, onBlur, grow, description, invalid, error, maxLength, }: PropsWithChildren) { const id = useId(name); return ( ); }