From 3e486df4fb2c4597f74d5175f655f6e245a6da95 Mon Sep 17 00:00:00 2001 From: Josh Hanley Date: Tue, 17 Dec 2024 18:13:04 +1100 Subject: [PATCH] Add fix so buttons and link buttons use `inline-flex` --- stubs/resources/views/flux/button/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/resources/views/flux/button/index.blade.php b/stubs/resources/views/flux/button/index.blade.php index 26d93c2..82c6030 100644 --- a/stubs/resources/views/flux/button/index.blade.php +++ b/stubs/resources/views/flux/button/index.blade.php @@ -46,7 +46,7 @@ 'sm' => 'h-8 text-sm rounded-md' . ' ' . ($square ? 'w-8' : 'px-3'), 'xs' => 'h-6 text-xs rounded-md' . ' ' . ($square ? 'w-6' : 'px-2'), }) - ->add($inset ? 'flex' : 'inline-flex') // inline-flex is weird with negative margins... + ->add('inline-flex') // Buttons are inline by default but links are blocks, so inline-flex is needed here to ensure link-buttons are displayed the same as buttons... ->add($inset ? match ($size) { // Inset... 'base' => $square ? Flux::applyInset($inset, top: '-mt-2.5', right: '-mr-2.5', bottom: '-mb-2.5', left: '-ml-2.5')