WIP: Implement frontend
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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,
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user