-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77fed71
commit 9fd2863
Showing
5 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@props(['loader' => false, 'tag']) | ||
<x-tag | ||
is="{{ $tag ?? ($attributes->has('href') || $attributes->has('v-bind:href') ? 'a' : 'button') }}" | ||
{{ $attributes->class([ | ||
'relative inline-block self-start text-center text-sm transition cursor-pointer', | ||
'disabled:cursor-not-allowed disabled:opacity-70', | ||
]) }} | ||
v-bind:disabled="$root.loading" | ||
> | ||
@if($loader) | ||
<div v-if="$root.loading" class="absolute left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2" v-cloak> | ||
<x-heroicon-o-arrow-path class="h-5 w-5 animate-spin" /> | ||
</div> | ||
@endif | ||
<span class="contents" @attributes([':class' => $loader ? '{ "invisible": $root.loading }' : false])> | ||
{{ $slot }} | ||
</span> | ||
</x-tag> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,3 @@ | ||
@props(['loader' => false, 'tag']) | ||
<x-tag | ||
is="{{ $tag ?? ($attributes->has('href') || $attributes->has('v-bind:href') ? 'a' : 'button') }}" | ||
{{ $attributes->class([ | ||
'relative inline-block self-start rounded py-4 px-6 text-center text-sm transition cursor-pointer', | ||
'disabled:cursor-not-allowed disabled:opacity-70', | ||
]) }} | ||
v-bind:disabled="$root.loading" | ||
> | ||
@if($loader) | ||
<div v-if="$root.loading" class="absolute left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2" v-cloak> | ||
<x-heroicon-o-arrow-path class="h-5 w-5 animate-spin" /> | ||
</div> | ||
@endif | ||
<span class="contents" @attributes([':class' => $loader ? '{ "invisible": $root.loading }' : false])> | ||
{{ $slot }} | ||
</span> | ||
</x-tag> | ||
<x-rapidez-ct::button.base {{ $attributes->class('py-4 px-6 rounded')) }}> | ||
{{ $slot }} | ||
</x-rapidez-ct::button.base> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<x-rapidez-ct::button {{ $attributes->merge(['class' => 'rounded border bg-white text-sm font-medium text-ct-primary']) }}> | ||
<x-rapidez-ct::button {{ $attributes->merge(['class' => 'rounded border bg-white text-sm font-medium text-ct-neutral']) }}> | ||
{{ $slot }} | ||
</x-rapidez-ct::button> |
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