This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@props([ | |
'trigger' => '' | |
]) | |
<div x-data="dropdown()" x-init="Popper.createPopper($el, $refs.popper, { placement: 'left', modifiers: [{name:'offset', options: {offset:[0,5]}}]});"> | |
<div class="relative inline-block text-left"> | |
<div x-spread="trigger"> | |
@if($trigger) | |
{{ $trigger }} | |
@else | |
<button type="button" class="inline-flex items-center px-0 py-1 border border-transparent rounded-md shadow-sm text-gray-400 bg-gray-100 hover:bg-gray-200 focus:outline-none " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Die and dump on the Nth time this function is called | |
*/ | |
if (! function_exists('dd_on')) { | |
function dd_on(int $number, ...$args): void | |
{ | |
if (!isset($GLOBALS['dd'])) { | |
$GLOBALS['dd'] = 0; | |
} |