|
|
|
@ -86,7 +86,7 @@ const fieldNamePickerSettings = {
|
|
|
|
|
settings: { width: 24 }, |
|
|
|
|
} as any; |
|
|
|
|
|
|
|
|
|
export function IconsEditor({ onChange, value, context }: StandardEditorProps<Array<IconConfig>>) { |
|
|
|
|
export function IconsEditor({ onChange, value, context }: StandardEditorProps<IconConfig[]>) { |
|
|
|
|
const icons = value; |
|
|
|
|
|
|
|
|
|
const addIcon = () => { |
|
|
|
@ -137,7 +137,7 @@ export function IconsEditor({ onChange, value, context }: StandardEditorProps<Ar
|
|
|
|
|
<div className={styles.icons}> |
|
|
|
|
{icons.map((icon, iconIdx) => { |
|
|
|
|
return ( |
|
|
|
|
<div className={styles.icon}> |
|
|
|
|
<div key={iconIdx} className={styles.icon}> |
|
|
|
|
<IconButton name="trash-alt" onClick={() => removeIcon(iconIdx)}></IconButton> |
|
|
|
|
<Input |
|
|
|
|
type="url" |
|
|
|
@ -160,7 +160,7 @@ export function IconsEditor({ onChange, value, context }: StandardEditorProps<Ar
|
|
|
|
|
|
|
|
|
|
{icon.conditions.map((condition, conditionIdx) => { |
|
|
|
|
return ( |
|
|
|
|
<HorizontalGroup> |
|
|
|
|
<HorizontalGroup key={conditionIdx}> |
|
|
|
|
<FieldNamePicker |
|
|
|
|
context={context} |
|
|
|
|
value={icon.metrics[conditionIdx]} |
|
|
|
|