resources/views/components/button.blade.php: bit of a hack, but add "element" prop and when it's "input" switch type to submit.
This commit is contained in:
parent
90210225d7
commit
65beeb1487
1 changed files with 3 additions and 1 deletions
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue