Skip to content

Commit

Permalink
added option: Items for color generator
Browse files Browse the repository at this point in the history
  • Loading branch information
RFbkak37y3kIY committed Aug 10, 2023
1 parent 00b4b80 commit 9172ebd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SimplePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const SimplePanel: React.FC<Props> = ({ options, data, width, height }: a
return labelItem[optionArr];
};
return {
messageID: `${_(options.source) || ''}${_(options.title) || ''}` || 'Title',
messageID: _(options.colorGenerator) || 'Title',
subTitle: options.showbody && message,
source: _(options.source) || '...',
destination: _(options.destination) || '...',
Expand Down
8 changes: 8 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ export const plugin = new PanelPlugin<SimpleOptions>(SimplePanel).setPanelOption
]
},
})
.addCustomEditor({
id: 'colorGenerator',
path: 'colorGenerator',
name: 'Items for color generator',
description: 'String label(s) for color (Labels[key])',
defaultValue: '',
editor: SimpleEditor,
})
.addBooleanSwitch({
path: 'showbody',
name: 'Show body [Line] value',
Expand Down

0 comments on commit 9172ebd

Please sign in to comment.