UNPKG

neft

Version:

Universal Platform

21 lines (16 loc) 511 B
<import src="input/NativeItem.html" as="NativeItem" /> <import src="input/RandomColor.html" as="RandomColor" /> <script> const { utils } = Neft; this.onRender(function () { this.state.set('enabled', utils.isBrowser || utils.isIOS || utils.isAndroid); }); </script> <NativeItem enabled="${state.enabled}"> <button n-style:textColor="${refs.colorInput.state.color}" >Button</button> </NativeItem> <blank n-if="${state.enabled}"> <RandomColor ref="colorInput" /> </blank>