Files
fizzy/app/javascript/controllers/bridge/share_controller.js
T
Adrien Maston 0b229c701b Rename event
2026-02-23 16:10:54 +01:00

15 lines
360 B
JavaScript

import { BridgeComponent } from "@hotwired/hotwire-native-bridge"
export default class extends BridgeComponent {
static component = "share"
shareUrl() {
const description = this.bridgeElement.bridgeAttribute("share-description")
this.send("shareUrl", {
title: document.title,
url: window.location.href,
description
})
}
}