From ec91efae27df8b50e0744b41c99a8126d0ced412 Mon Sep 17 00:00:00 2001 From: Amio Date: Sat, 28 Jul 2018 10:30:58 +0800 Subject: [PATCH] feat: tweak icon position & size (14 => 13.2) --- lib/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/index.js b/lib/index.js index e5d21c7..f1d3f73 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,7 +8,7 @@ module.exports = function ({subject, status, color, style, emoji, icon}) { color = colorPresets[color] || color || colorPresets['blue'] const stTextWidth = calcWidth(status, emoji) - const sbRectWidth = calcWidth(subject, emoji) + 10 + (icon ? 17 : 0) + const sbRectWidth = calcWidth(subject, emoji) + 10 + (icon ? 15 : 0) const stRectWidth = stTextWidth + 10 const width = sbRectWidth + stRectWidth @@ -20,8 +20,8 @@ module.exports = function ({subject, status, color, style, emoji, icon}) { - ${subject} - ${subject} + ${subject} + ${subject} ${status} ${status} ${icon ? genIconMarkup(icon) : ''} @@ -42,8 +42,8 @@ module.exports = function ({subject, status, color, style, emoji, icon}) { - ${subject} - ${subject} + ${subject} + ${subject} ${status} ${status} ${icon ? genIconMarkup(icon) : ''} @@ -52,7 +52,7 @@ module.exports = function ({subject, status, color, style, emoji, icon}) { } function genIconMarkup (iconB64) { - return `` + return `` } function typeAssert (assertion, message) {