|
15 | 15 | </x-button>
|
16 | 16 | @else
|
17 | 17 | @if(isset($article))
|
18 |
| - <x-button type="button" wire:click="save"> |
19 |
| - <x-loader class="text-white" wire:loading wire:target="save" /> |
20 |
| - Enregistrer |
21 |
| - </x-button> |
| 18 | + <span class="relative z-20 inline-flex shadow-sm rounded-md"> |
| 19 | + <button type="button" class="button inline-flex items-center justify-center py-2 px-4 text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-body focus:ring-green-500 rounded-l-md border-r border-white" disabled> |
| 20 | + Enregistrer les modifications |
| 21 | + </button> |
| 22 | + <span x-data="{ open: false }" @keydown.escape.stop="open = false;" @click.away="open = false" class="-ml-px relative block"> |
| 23 | + <button type="button" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-transparent text-sm font-medium text-white text-white bg-green-600 hover:bg-green-700 focus:z-10 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-body focus:ring-green-500" |
| 24 | + id="option-menu-button" |
| 25 | + x-ref="button" |
| 26 | + @click="open = !open" |
| 27 | + aria-expanded="false" aria-haspopup="true" x-bind:aria-expanded="open.toString()"> |
| 28 | + <span class="sr-only">Ouvrir les options</span> |
| 29 | + <x-heroicon-s-chevron-down class="h-5 w-5" /> |
| 30 | + </button> |
| 31 | + |
| 32 | + <div x-show="open" |
| 33 | + x-transition:enter="transition ease-out duration-100" |
| 34 | + x-transition:enter-start="transform opacity-0 scale-95" |
| 35 | + x-transition:enter-end="transform opacity-100 scale-100" |
| 36 | + x-transition:leave="transition ease-in duration-75" |
| 37 | + x-transition:leave-start="transform opacity-100 scale-100" |
| 38 | + x-transition:leave-end="transform opacity-0 scale-95" |
| 39 | + class="origin-top-right absolute right-0 mt-2 -mr-1 w-56 rounded-md shadow-lg bg-skin-card ring-1 ring-black ring-opacity-5 focus:outline-none" |
| 40 | + x-ref="menu-items" |
| 41 | + role="menu" aria-orientation="vertical" aria-labelledby="option-menu-button" tabindex="-1" |
| 42 | + @keydown.tab="open = false" @keydown.enter.prevent="open = false;" @keyup.space.prevent="open = false;" style="display: none;"> |
| 43 | + <div class="py-1" role="none"> |
| 44 | + <button type="button" wire:click="submit" class="block px-4 py-2 text-sm text-skin-inverted-muted hover:text-skin-inverted" role="menuitem" tabindex="-1" id="option-menu-item-0"> |
| 45 | + <x-loader class="text-white" wire:loading wire:target="submit" /> |
| 46 | + Enregistrer et soumettre |
| 47 | + </button> |
| 48 | + <button type="button" wire:click="save" class="block px-4 py-2 text-sm text-skin-inverted-muted hover:text-skin-inverted" role="menuitem" tabindex="-1" id="option-menu-item-1"> |
| 49 | + <x-loader class="text-white" wire:loading wire:target="save" /> |
| 50 | + Enregistrer en brouillon |
| 51 | + </button> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + </span> |
| 55 | + </span> |
22 | 56 | @else
|
23 | 57 | <x-button type="button" wire:click="submit">
|
24 | 58 | <x-loader class="text-white" wire:loading wire:target="submit" />
|
|
0 commit comments