Files
fizzy/app/javascript/bridge/initializers/bridge_element.js
T
2026-01-06 15:54:10 +01:00

14 lines
381 B
JavaScript

import { BridgeElement } from "@hotwired/hotwire-native-bridge"
BridgeElement.prototype.isDisplayedOnPlatform = function() {
return !this.hasClass("hide-on-native")
}
BridgeElement.prototype.showOnPlatform = function() {
this.element.classList.remove("hide-on-native")
}
BridgeElement.prototype.hideOnPlatform = function() {
this.element.classList.add("hide-on-native")
}