From 098d62b28454597607b35ddd2dc3334243785b6c Mon Sep 17 00:00:00 2001 From: Kuldeep Matharu Date: Mon, 22 Jul 2024 10:54:26 +0100 Subject: [PATCH] optional colour text --- src/component/control/color/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/component/control/color/index.js b/src/component/control/color/index.js index e1e84ff1..30fb4b64 100644 --- a/src/component/control/color/index.js +++ b/src/component/control/color/index.js @@ -16,6 +16,7 @@ export const Control_color = function ({ labelText = 'Label', srOnly = false, value = '#000000', + text = true, defaultValue = false, action = false, randomColor = false, @@ -163,12 +164,13 @@ export const Control_color = function ({ const formGroup = form.group({ block: true, - children: [ - this.color, - this.text - ] + children: [this.color] }); + if (text) { + formGroup.appendChild(this.text); + } + if (randomColor) { formGroup.appendChild(this.random.button); }