From 65beeb1487ce36865ccec472fdc489844689c18c Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 31 Dec 2021 16:53:05 +0100 Subject: [PATCH] resources/views/components/button.blade.php: bit of a hack, but add "element" prop and when it's "input" switch type to submit. --- resources/views/components/button.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php index a6f159b..3c2b58f 100644 --- a/resources/views/components/button.blade.php +++ b/resources/views/components/button.blade.php @@ -1,4 +1,4 @@ -@props(['href' => false, 'type' => 'default']) +@props(['href' => false, 'type' => 'default', 'element' => false]) @php @@ -22,6 +22,8 @@ default: if ($href) { $element = 'a'; $attributes = $attributes->merge([ 'href' => $href ]); +} else if ($element == 'input') { + $attributes = $attributes->merge([ 'type' => 'submit' ]); } else { $element = 'button'; }