21 lines
500 B
JavaScript
21 lines
500 B
JavaScript
import { Controller } from '@hotwired/stimulus'
|
|
|
|
export default class extends Controller {
|
|
static outlets = [ 'confirmation-modal', 'ajax-modal' ]
|
|
|
|
confirmation({ params: { title, action, content } }) {
|
|
this.confirmationModalOutlet.show({
|
|
title: title,
|
|
action: action,
|
|
content: content,
|
|
})
|
|
}
|
|
|
|
ajax({ params: { title, url } }) {
|
|
this.ajaxModalOutlet.show({
|
|
title: title,
|
|
url: url,
|
|
})
|
|
}
|
|
}
|