Add bridge page controller and helpers.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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")
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
// Bridge initializers live here.
|
||||
import "bridge/initializers/bridge_element"
|
||||
|
||||
Reference in New Issue
Block a user