Colours not showing for a checkbox

Hi,

I am trying to use colours on a checkbox based on if it’s selected. I am using the following code and it doesn’t work.

    - type: component.checkbox
      instanceId: chkbox
      options:
        label: "checkbox"
        color:
          - when: =(@ctx.components.chkbox.state.value = null)
            color: color2
          - when: =(@ctx.components.chkbox.state.value = true)
            color: color4

Any ideas

Thanks,
Adam.

Hey Adam,

Had a quick look and noticed same as you that color makes no difference, I have logged this on our end. Thank you for reporting this.

Without knowing your exact requirements, have a look at style you can accomplish the following:

Let me know if you have any additional questions.

Chat soon,
r

1 Like