Added dashName variable

Allows user to change DashDot Name
This commit is contained in:
Larvey
2023-04-25 13:43:14 -04:00
parent 39c89c3f6d
commit 59238ae2a6

View File

@@ -13,6 +13,10 @@ const definition = defineWidget({
id: 'dashdot',
icon: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/dashdot.png',
options: {
dashName: {
type: 'text',
defaultValue: 'Dash.',
},
url: {
type: 'text',
defaultValue: '',
@@ -177,11 +181,11 @@ function DashDotTile({ widget }: DashDotTileProps) {
);
}
const { graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
const { dashName, graphsOrder, usePercentages, columns, graphHeight } = widget.properties;
return (
<Stack spacing="xs">
<Title order={3}>{t('card.title')}</Title>
<Title order={3}>{dashName ? dashName : t('card.title')}</Title>
{!info && <p>{t('card.errors.noInformation')}</p>}
{info && (
<div className={classes.graphsContainer}>