Questions regarding style props and how they behave when they are nested

  1. You need to use the items property (Json-Schema Array Reference).
// The multistate button schema probably looks something like this...
{
    "properties": {
        "states": {
            "type": "array",
            "items": {
                "type": "object",
                "default": {
                    "text": "",
                    "value": "",
                    "selectedStyle": {},
                    "unselectedStyle": {}
                },
                "properties": {
                    "text": {
                        "type": "string"
                    },
                    "value": {
                        "type": "string"
                    },
                    "selectedStyle": {
                        "$ref": "urn:ignition-schema:schemas/style-properties.schema.json"
                    },
                    "unselectedStyle": {
                        "$ref": "urn:ignition-schema:schemas/style-properties.schema.json"
                    }
                }
            }
        }
    }
}
  1. The schema reference shouldn't be under default, but instead under the property definition. See #1.

  2. I'm not sure what's possible with conditional styling. I've only played around with it enough to know it's kinda limited.

2 Likes