2026-04-23 09:23:31 +00:00
|
|
|
@props(['text', 'label' => null])
|
2025-01-31 17:31:02 +00:00
|
|
|
|
2026-08-18 16:20:38 +00:00
|
|
|
<div class="w-full">
|
2026-04-23 09:23:31 +00:00
|
|
|
@if ($label)
|
2026-06-15 11:17:53 +00:00
|
|
|
<label class="flex gap-1 items-center mb-1 text-sm font-medium text-black dark:text-white">{{ $label }}</label>
|
2026-04-23 09:23:31 +00:00
|
|
|
@endif
|
|
|
|
|
<div class="relative">
|
2026-06-15 11:17:53 +00:00
|
|
|
<input type="text" value="{{ $text }}"
|
2026-08-17 14:19:41 +00:00
|
|
|
class="input input-with-copy-button bg-white dark:bg-coolgray-100 dark:read-only:bg-coolgray-100 dark:read-only:text-white"
|
2026-06-15 11:17:53 +00:00
|
|
|
readonly
|
2026-04-23 09:23:31 +00:00
|
|
|
@keydown.prevent @paste.prevent @cut.prevent @drop.prevent
|
|
|
|
|
@focus="$event.target.select()">
|
2026-08-18 16:20:38 +00:00
|
|
|
<x-copy-button :value="$text" class="absolute top-1/2 right-2 -translate-y-1/2" />
|
2026-04-23 09:23:31 +00:00
|
|
|
</div>
|
2025-01-31 17:31:02 +00:00
|
|
|
</div>
|