kopia lustrzana https://github.com/badgen/badgen
Cleanup unused code for monospace version
rodzic
7e1dfac370
commit
7d1183eb16
lib
|
@ -4,15 +4,11 @@ const colorPresets = require('./color-presets.js')
|
|||
module.exports = function ({subject, status, color}) {
|
||||
color = colorPresets[color] || color || colorPresets['green']
|
||||
|
||||
// const charWidth = 7.3
|
||||
|
||||
const sbTextWidth = calcWidth(subject)
|
||||
// const sbTextWidth = subject.length * charWidth
|
||||
const sbRectWidth = sbTextWidth + 10
|
||||
const sbTextCenter = sbRectWidth / 2
|
||||
|
||||
const stTextWidth = calcWidth(status)
|
||||
// const stTextWidth = status.length * charWidth
|
||||
const stRectWidth = stTextWidth + 12
|
||||
const stTextCenter = sbRectWidth + stRectWidth / 2 - 1
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue