You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
602 B
21 lines
602 B
import React from 'react';
|
|
import { InlineField, TextArea } from '@grafana/ui';
|
|
import { EditorProps } from '../QueryEditor';
|
|
|
|
export const RawFrameEditor = ({ onChange, query }: EditorProps) => {
|
|
const onContent = (rawFrameContent: string) => {
|
|
onChange({ ...query, rawFrameContent });
|
|
};
|
|
|
|
return (
|
|
<InlineField label="Frames" labelWidth={14}>
|
|
<TextArea
|
|
width="100%"
|
|
rows={10}
|
|
onBlur={(e) => onContent(e.currentTarget.value)}
|
|
placeholder="frames array (JSON)"
|
|
defaultValue={query.rawFrameContent ?? '[]'}
|
|
/>
|
|
</InlineField>
|
|
);
|
|
};
|
|
|