generated from rapidez/package-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1895d9f
commit 976a132
Showing
15 changed files
with
86 additions
and
93 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,30 +1,12 @@ | ||
{{-- | ||
This is the base for all the buttons. In here we don't need classes. | ||
If you want to change styling for buttons go to the button/button. | ||
- `href` attribute results in an `<a>` | ||
- `for` attribute results in a `<label>` | ||
- Fallback/default is `<button>` | ||
Examples: | ||
``` | ||
<x-rapidez::button href="something">Something</x-rapidez::button> | ||
``` | ||
``` | ||
<x-rapidez::button for="something">Something</x-rapidez::button> | ||
``` | ||
The classes that are set on this button are the base for most other buttons. | ||
It is not recommended to use this button. Make use of the other buttons. ie: `button/primary` | ||
Example: | ||
``` | ||
<x-rapidez::button>Something</x-rapidez::button> | ||
``` | ||
--}} | ||
@props(['tag' => 'button']) | ||
|
||
@php | ||
$tag = $attributes->hasAny('href', ':href', 'v-bind:href', 'x-bind:href') ? 'a' : $tag; | ||
$tag = $attributes->has('for') ? 'label' : $tag; | ||
@endphp | ||
|
||
<x-rapidez::tag is="{{ $tag }}" {{ $attributes }}> | ||
<x-rapidez::button.tag {{ $attributes->twMerge('inline-flex items-center justify-center transition font-medium text-base rounded min-h-12 py-1.5 px-5 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer gap-x-1.5') }}> | ||
{{ $slot }} | ||
</x-rapidez::tag> | ||
</x-rapidez::button.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,12 +1,10 @@ | ||
{{-- | ||
This is the default button if you use the example you get this. | ||
It is not recommended to use this button. Make use of the other buttons. ie: `button/primary` | ||
The default button is a variant used for basic use cases. | ||
Example: | ||
``` | ||
<x-rapidez::button>Something</x-rapidez::button> | ||
``` | ||
--}} | ||
<x-rapidez::button.base {{ $attributes->twMerge('relative inline-flex items-center justify-center text transition bg text-base font-medium rounded min-h-12 py-1.5 px-5 hover:bg-opacity-80 border-b border-b-black/15 disabled:text-muted disabled:bg-muted disabled:cursor-not-allowed') }}> | ||
<x-rapidez::button.base {{ $attributes->twMerge('bg text-muted hover:text hover:bg-emphasis border-b border-b-black/10') }}> | ||
{{ $slot }} | ||
</x-rapidez::button.base> | ||
</x-rapidez::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
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
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
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,30 @@ | ||
{{-- | ||
This is the tag used for all the buttons. In here we don't need classes. | ||
If you want to change styling for buttons go to the button/base. | ||
- `href` attribute results in an `<a>` | ||
- `for` attribute results in a `<label>` | ||
- Fallback/default is `<button>` | ||
Examples: | ||
``` | ||
<x-rapidez::button href="something">Something</x-rapidez::button> | ||
``` | ||
``` | ||
<x-rapidez::button for="something">Something</x-rapidez::button> | ||
``` | ||
``` | ||
<x-rapidez::button>Something</x-rapidez::button> | ||
``` | ||
--}} | ||
@props(['tag' => 'button']) | ||
|
||
@php | ||
$tag = $attributes->hasAny('href', ':href', 'v-bind:href', 'x-bind:href') ? 'a' : $tag; | ||
$tag = $attributes->has('for') ? 'label' : $tag; | ||
@endphp | ||
|
||
<x-rapidez::tag is="{{ $tag }}" {{ $attributes }}> | ||
{{ $slot }} | ||
</x-rapidez::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
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