<div class="">
<ch5-button type="info" label="change hall_lights_tap which will toggle hall_lights_selected" sendEventOnClick="hall_lights_tap"></ch5-button>
</div>
<br>
<ch5-button type="success" shape="rectangle" label="ReceiveSelectedFromSignal" receiveStateSelected="hall_lights_selected"></ch5-button>
.material-icons.alarm_on:before {
content:"alarm_on";
}
.material-icons.bookmark:before {
content:"bookmark";
}
.material-icons.announcement:before {
content:"announcement";
}
.material-icons.account_box:before {
content:"account_box";
}
.material-icons.aspect_ratio:before {
content:"aspect_ratio";
}
<div class="btn_rec_sel_container content">
<button class="btn_rec_sel_true button is-info" type="button">Set btn_receive_selected to true</button>
<button class="btn_rec_sel_false button is-info" type="button">Set btn_receive_selected to false</button>
</div>
<ch5-button type="success" shape="rectangle" label="ReceiveSelectedFromSignal" receiveStateSelected="btn_receive_selected"></ch5-button>
(function($, crLib){
var container = $('.btn_rec_sel_container');
var sigName = 'btn_receive_selected';
container.off('click');
container.on('click', '.btn_rec_sel_true', function() {
crLib.publishEvent('b', sigName, true);
});
container.on('click', '.btn_rec_sel_false', function() {
crLib.publishEvent('b',sigName, false);
});
})(jQuery,CrComLib);
Selected buttons
Default/Unselected buttons
<p>
Selected buttons
<ch5-button type="success" shape="rectangle"
label="Button1" selected></ch5-button>
<ch5-button type="success" shape="rectangle"
label="Button2" selected="true"></ch5-button>
</p>
<p>
Default/Unselected buttons
<ch5-button type="success" shape="rectangle"
label="Button3"></ch5-button>
<ch5-button type="success" shape="rectangle"
label="Button4" selected="false"></ch5-button>
</p>