2023-11-12 03:03:59 -08:00
|
|
|
import { Controller } from "@hotwired/stimulus";
|
|
|
|
|
|
|
|
export default class extends Controller {
|
|
|
|
|
|
|
|
static values = {
|
|
|
|
copy: String
|
2023-11-12 03:17:33 -08:00
|
|
|
};
|
2023-11-12 03:03:59 -08:00
|
|
|
|
|
|
|
declare readonly copyValue: string;
|
|
|
|
|
|
|
|
async copy(){
|
2023-11-12 03:17:33 -08:00
|
|
|
await navigator.clipboard.writeText(this.copyValue);
|
2023-11-12 03:03:59 -08:00
|
|
|
}
|
|
|
|
}
|