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.
Renamed base to tag and button to base
- Loading branch information
1 parent
ee6a873
commit 403b161
Showing
11 changed files
with
50 additions
and
50 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
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> | ||
``` | ||
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` | ||
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 muted button is a variant used for basic use cases. | ||
Example: | ||
``` | ||
<x-rapidez::button>Something</x-rapidez::button> | ||
<x-rapidez::button.muted>Something</x-rapidez::button.muted> | ||
``` | ||
--}} | ||
<x-rapidez::button.base {{ $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') }}> | ||
<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 was deleted.
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
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 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> | ||
``` | ||
``` | ||
<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> |