Skip to content

Commit ff63c3d

Browse files
authored
Merge pull request #1160 from EnsembleUI/triple-state-switch-widget
Add triple state switch widget
2 parents e7a1101 + cee5c53 commit ff63c3d

File tree

3 files changed

+318
-56
lines changed

3 files changed

+318
-56
lines changed

assets/schema/ensemble_schema.json

+73-17
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,35 @@
18491849
]
18501850
},
18511851
"Switch-payload": {
1852+
"type": "object",
1853+
"allOf": [
1854+
{
1855+
"$ref": "#/$defs/FormInput-payload"
1856+
},
1857+
{
1858+
"type": "object",
1859+
"properties": {
1860+
"value": {
1861+
"type": "boolean"
1862+
},
1863+
"leadingText": {
1864+
"type": "string"
1865+
},
1866+
"trailingText": {
1867+
"type": "string"
1868+
},
1869+
"styles": {
1870+
"allOf": [
1871+
{
1872+
"$ref": "#/$defs/switchStyles"
1873+
}
1874+
]
1875+
}
1876+
}
1877+
}
1878+
]
1879+
},
1880+
"TripleStateSwitch-payload": {
18521881
"type": "object",
18531882
"allOf": [
18541883
{
@@ -1867,25 +1896,19 @@
18671896
"type": "string"
18681897
},
18691898
"styles": {
1870-
"type": "object",
1871-
"properties": {
1872-
"activeColor": {
1873-
"$ref": "#/$defs/type-color",
1874-
"description": "The active color of the Switch Widget."
1875-
},
1876-
"inactiveColor": {
1877-
"$ref": "#/$defs/type-color",
1878-
"description": "The inactive color of the Switch Widget."
1879-
},
1880-
"activeThumbColor": {
1881-
"$ref": "#/$defs/type-color",
1882-
"description": "The active thumb color of the Switch Widget."
1899+
"allOf": [
1900+
{
1901+
"$ref": "#/$defs/switchStyles"
18831902
},
1884-
"inactiveThumbColor": {
1885-
"$ref": "#/$defs/type-color",
1886-
"description": "The inactive thumb color of the Switch Widget."
1903+
{
1904+
"properties": {
1905+
"intermediateColor": {
1906+
"$ref": "#/$defs/type-color",
1907+
"description": "The middle state color of the Switch Widget."
1908+
}
1909+
}
18871910
}
1888-
}
1911+
]
18891912
}
18901913
}
18911914
}
@@ -5953,6 +5976,18 @@
59535976
}
59545977
}
59555978
},
5979+
{
5980+
"title": "TripleStateSwitch",
5981+
"required": [
5982+
"TripleStateSwitch"
5983+
],
5984+
"properties": {
5985+
"TripleStateSwitch": {
5986+
"$ref": "#/$defs/TripleStateSwitch-payload",
5987+
"description": "Kitchen Sink Example: https://studio.ensembleui.com/app/e24402cb-75e2-404c-866c-29e6c3dd7992/screen/"
5988+
}
5989+
}
5990+
},
59565991
{
59575992
"title": "Slider",
59585993
"required": [
@@ -8106,6 +8141,27 @@
81068141
"description": "Use the kochava.com for deeplink service"
81078142
}
81088143
]
8144+
},
8145+
"switchStyles": {
8146+
"type": "object",
8147+
"properties": {
8148+
"activeColor": {
8149+
"$ref": "#/$defs/type-color",
8150+
"description": "The active color of the Switch Widget."
8151+
},
8152+
"inactiveColor": {
8153+
"$ref": "#/$defs/type-color",
8154+
"description": "The inactive color of the Switch Widget."
8155+
},
8156+
"activeThumbColor": {
8157+
"$ref": "#/$defs/type-color",
8158+
"description": "The active thumb color of the Switch Widget."
8159+
},
8160+
"inactiveThumbColor": {
8161+
"$ref": "#/$defs/type-color",
8162+
"description": "The inactive thumb color of the Switch Widget."
8163+
}
8164+
}
81098165
}
81108166
}
81118167
}

0 commit comments

Comments
 (0)