/* * ---------------------------------------- * Hyperscript utilities for core * ---------------------------------------- */ /* * Disabling A button tag * @link https://getbootstrap.com/docs/5.2/components/buttons/#link-functionality-caveat * * @param {bool} disable If true, A button will be disabled. * @param {Object} targetElement A button element */ def core.utils.disableLinkButton(disable, targetElement) if disable then add .disabled to targetElement add [@tabindex=-1] to targetElement add [@aria-disabled=true] to targetElement else remove .disabled from targetElement remove [@tabindex=-1] from targetElement remove [@aria-disabled=true] from targetElement end end