mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
therefore we can compose any controller from it - simplify `help-modal-controller` then - + create a simple `modal-controller` that close on `modal:close` event
11 lines
258 B
JavaScript
11 lines
258 B
JavaScript
import { Controller } from "stimulus";
|
|
import { useOpenAndCloseAsAModal } from "./mixins/useOpenAndCloseAsAModal";
|
|
|
|
export default class extends Controller {
|
|
static targets = ["background", "modal"];
|
|
|
|
connect() {
|
|
useOpenAndCloseAsAModal(this);
|
|
}
|
|
}
|