Radio functional

This commit is contained in:
Jiiks 2018-02-12 02:48:44 +02:00
parent 44b9450efa
commit f37058779a
4 changed files with 33 additions and 23 deletions

View File

@ -190,7 +190,7 @@ export default class ThemeManager extends ContentManager {
return `$${name}: ${value * setting.multi || 1};`;
}
if (type === 'dropdown') {
if (type === 'dropdown' || type === 'radio') {
return `$${name}: ${setting.options.find(opt => opt.value === value).text};`;
}

View File

@ -68,6 +68,35 @@
}
]
},
{
"id": "radioTest",
"type": "radio",
"value": "opt1",
"text": "Span text colour",
"hint": "Radio Test Setting Hint",
"options": [
{
"value": "opt1",
"text": "red"
},
{
"value": "opt2",
"text": "green"
},
{
"value": "opt3",
"text": "blue"
},
{
"value": "opt4",
"text": "orange"
},
{
"value": "opt5",
"text": "white"
}
]
},
{
"id": "default-0",
"type": "text",
@ -81,27 +110,6 @@
"value": true,
"text": "Work properly",
"hint": "Just some test settings to test the settings panel for themes"
},
{
"id": "default-2",
"type": "radio",
"value": "opt1",
"text": "Test Radio Setting",
"hint": "Just some test settings to test the settings panel for themes",
"options": [
{
"value": 1,
"text": "Option 1"
},
{
"value": 2,
"text": "Option 2"
},
{
"value": 3,
"text": "Option 3"
}
]
}
]
}

View File

@ -6,6 +6,7 @@ div {
span {
border: 1px solid rgba(20, 20, 20, $spanOpacity);
color: $radioTest !important;
}
.avatar-large {

View File

@ -1,4 +1,5 @@
$divBg: green !default;
$spanOpacity: 0.5 !default;
$avatar: "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Cow_female_black_white.jpg/220px-Cow_female_black_white.jpg" !default;
$avatarRadius: 8px !default;
$avatarRadius: 8px !default;
$radioTest: red !default;