@grafana/ui
Version:
Grafana Components Library
17 lines (16 loc) • 626 B
TypeScript
import type * as React from 'react';
import { type DataFrame, type RegistryItem, type FieldMatcherInfo } from '@grafana/data';
import { type MatcherScope } from '@grafana/schema';
export interface FieldMatcherUIRegistryItem<TOptions> extends RegistryItem {
component: React.ComponentType<MatcherUIProps<TOptions>>;
matcher: FieldMatcherInfo<TOptions>;
optionsToLabel: (options: TOptions) => string;
}
export interface MatcherUIProps<T> {
matcher: FieldMatcherInfo<T>;
id?: string;
data: DataFrame[];
options: T;
scope?: MatcherScope;
onChange: (options: T, scope?: MatcherScope) => void;
}