replace labels with badges

This commit is contained in:
Oliver committed 2021-10-28 17:41:40 +11:00
1 parent c4fd9b7177
commit f8ac016d60
19 files changed
+82 -181

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ const {{ label }}Codes = {
{% for opt in options %}'{{ opt.key }}': {
key: '{{ opt.key }}',
value: '{{ opt.value }}',{% if opt.color %}
label: 'label-{{ opt.color }}',{% endif %}
label: 'bg-{{ opt.color }}',{% endif %}
},
{% endfor %}
};
@@ -32,7 +32,7 @@ function {{ label }}StatusDisplay(key, options={}) {
label = '';
}
var classes = `label ${label}`;
var classes = `badge rounded-pill ${label}`;
if (options.classes) {
classes += ' ' + options.classes;