From c35865aa536aaa13bb7e289973bb49bfe6061202 Mon Sep 17 00:00:00 2001 From: Meena Brend Date: Thu, 28 Jul 2022 09:05:46 +0100 Subject: [PATCH] fix: consistent styles improved for button toggle --- lib/builders/Input.Toggle.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/builders/Input.Toggle.js b/lib/builders/Input.Toggle.js index 03976033..7e9e4376 100644 --- a/lib/builders/Input.Toggle.js +++ b/lib/builders/Input.Toggle.js @@ -20,14 +20,25 @@ module.exports = function (definition, options) { if (style === 'button') { const opts = [{ value: true }] - if (icon) opts[0].icon = icon - if (title) opts[0].label = title + if (icon) { + opts[0].icon = icon + } + + if (title) { + opts[0].label = title + } div .addChildTag('q-btn-toggle') .addAttribute(':options', inspect(opts)) - .addAttribute(':clearable', true) - .addAttribute('flat', null) + .addAttribute('clearable', null) + .addAttribute('class', 'button-toggle') + .addAttribute('toggle-color', 'white') + .addAttribute('toggle-text-color', 'primary') + .addAttribute('color', 'lighter') + .addAttribute('text-color', 'faded') + .addAttribute('no-caps', null) + .addAttribute('unelevated', null) .addAttribute('dense', null) .bindToModel(definition) } else {