Enable/disabled HTML elements

The simpler way to enable or disabled HTML elements

Example

See this example on jsfiddle

Source code

<html>
<script src="https://lemonadejs.com/v2/lemonade.js"></script>
<div id='root'></div>
<script>
function App() {
    let self = {};
    self.disabled= false;
    let template = `<>
        <input type="button" onclick="self.disabled = !self.disabled" value="{{!self.disabled?'Disable':'Enabled'}}" />
        <input type="text" disabled="{{self.disabled}}" />
    </>`;

    return lemonade.element(template, self);
}

lemonade.render(App, document.getElementById('root'));
</script>
</html>