kopia lustrzana https://github.com/badgen/badgen
Add color presets
rodzic
e3a92a6c0d
commit
cdf127c7f1
|
@ -0,0 +1,11 @@
|
||||||
|
module.exports = {
|
||||||
|
green: '3C1',
|
||||||
|
blue: '08C',
|
||||||
|
red: 'D52',
|
||||||
|
yellow: 'DB1',
|
||||||
|
orange: 'F73',
|
||||||
|
purple: 'A3E',
|
||||||
|
pink: 'E48',
|
||||||
|
grey: '999',
|
||||||
|
black: '000'
|
||||||
|
}
|
|
@ -1,6 +1,9 @@
|
||||||
const calcWidth = require('./calc-text-width.js').Arial12
|
const calcWidth = require('./calc-text-width.js').Arial12
|
||||||
|
const colorPresets = require('./color-presets.js')
|
||||||
|
|
||||||
|
module.exports = function ({subject, status, color}) {
|
||||||
|
color = colorPresets[color] || color || colorPresets['green']
|
||||||
|
|
||||||
module.exports = function ({subject, status, color = '3C1'}) {
|
|
||||||
// const charWidth = 7.3
|
// const charWidth = 7.3
|
||||||
const calcFactor = 0.4
|
const calcFactor = 0.4
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue