Skip to content

Commit

Permalink
refactor: clipboard component allow alpine property (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarnsley authored Oct 22, 2024
1 parent 3edd2fa commit 8ee6049
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions resources/views/clipboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@props ([
'value',
'value' => null,
'alpineProperty' => null,
'class' => 'h-10 w-12',
'copyInput' => false,
'noStyling' => false,
Expand All @@ -22,10 +23,14 @@
$class,
])
tooltip-content="{{ $tooltipContent }}"
@if($copyInput)
x-on:click="copyFromInput('{{ $value }}')"
@if($alpineProperty)
x-on:click="copy({{ $alpineProperty }})"
@else
x-on:click="copy('{{ $value }}')"
@if($copyInput)
x-on:click="copyFromInput('{{ $value }}')"
@else
x-on:click="copy('{{ $value }}')"
@endif
@endif
>
@unless ($withCheckmarks)
Expand Down

0 comments on commit 8ee6049

Please sign in to comment.