kopia lustrzana https://github.com/badgen/badgen
feat: tweak icon right space when empty subject
rodzic
ab373bfdc0
commit
5cb3adc2d2
|
@ -6,7 +6,7 @@ module.exports = function ({subject, status, color, style, emoji, icon, iconWidt
|
|||
typeAssert(typeof status === 'string', '<status> must be string')
|
||||
color = colorPresets[color] || color || colorPresets['blue']
|
||||
|
||||
const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 1.5) : 0
|
||||
const iconSpanWidth = icon ? (subject.length ? iconWidth + 4 : iconWidth - 2) : 0
|
||||
const stTextWidth = calcWidth(status, emoji)
|
||||
const sbRectWidth = calcWidth(subject, emoji) + 10 + iconSpanWidth
|
||||
const stRectWidth = stTextWidth + 10
|
||||
|
|
Ładowanie…
Reference in New Issue