mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
19 lines
398 B
JavaScript
19 lines
398 B
JavaScript
import { Controller } from "stimulus";
|
|
|
|
export default class extends Controller {
|
|
static values = { target: String };
|
|
|
|
open() {
|
|
let modal = document.getElementById(this.targetValue);
|
|
let modalController = this.application.getControllerForElementAndIdentifier(
|
|
modal,
|
|
this.getIdentifier()
|
|
);
|
|
modalController.open();
|
|
}
|
|
|
|
getIdentifier() {
|
|
return "modal";
|
|
}
|
|
}
|