This commit is contained in:
Sam Potts
2017-11-09 19:40:45 +11:00
parent 86a5724bdb
commit f878581c8f
14 changed files with 78 additions and 59 deletions

10
src/js/controls.js vendored
View File

@ -195,12 +195,18 @@ const controls = {
if (utils.is.string(iconToggled)) {
button.appendChild(
controls.createIcon.call(this, iconToggled, {
class: `icon--${iconToggled}`,
class: 'icon--pressed',
})
);
button.appendChild(
controls.createIcon.call(this, iconDefault, {
class: 'icon--not-pressed',
})
);
} else {
button.appendChild(controls.createIcon.call(this, iconDefault));
}
button.appendChild(controls.createIcon.call(this, iconDefault));
button.appendChild(controls.createLabel.call(this, labelKey));
utils.setAttributes(button, attributes);