Skip to content

Commit e1bd927

Browse files
update legacy button component (#395)
* update button component * Update src/components/FieldEditor.tsx Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> * Update src/components/FieldEditor.tsx Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> * prettier --------- Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
1 parent b9aa634 commit e1bd927

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/components/FieldEditor.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FieldType, SelectableValue } from '@grafana/data';
2-
import { Icon, InlineField, InlineFieldRow, Input, Select } from '@grafana/ui';
2+
import { Button, InlineField, InlineFieldRow, Input, Select } from '@grafana/ui';
33
import React from 'react';
44
import { JsonField, QueryLanguage } from 'types';
55
import { JsonataQueryField } from './JsonataQueryField';
@@ -94,15 +94,16 @@ export const FieldEditor = ({ value = [], onChange, limit, onComplete }: Props)
9494
</InlineField>
9595

9696
{(!limit || value.length < limit) && (
97-
<a className="gf-form-label" onClick={addField(index, { language: field.language ?? 'jsonpath' })}>
98-
<Icon name="plus" />
99-
</a>
97+
<Button
98+
variant="secondary"
99+
onClick={addField(index, { language: field.language ?? 'jsonpath' })}
100+
title="plus"
101+
icon="plus"
102+
/>
100103
)}
101104

102105
{value.length > 1 ? (
103-
<a className="gf-form-label" onClick={removeField(index)}>
104-
<Icon name="minus" />
105-
</a>
106+
<Button variant="secondary" onClick={removeField(index)} icon="minus" title="minus" />
106107
) : null}
107108
</InlineFieldRow>
108109
))}

0 commit comments

Comments
 (0)