Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 45 additions & 17 deletions demo/components.html

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions resources/views/components-preview.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,30 @@
</div>
</div>

<div class="grid grid-cols-1 gap-5 items-start lg:grid-cols-3">
<div>
<h3 class="text-xl font-bold">Button link</h3>
<div class="text-sm text-muted">
Show a button as a simple link with an underline on hover.
The button has no background or padding.
</div>
</div>
<div class="flex flex-col gap-y-2">
<x-rapidez::button.link>Link</x-rapidez::button.link>
<x-rapidez::button.link disabled>Link disabled</x-rapidez::button.link>
</div>
<div class="flex flex-col gap-y-2">
<x-rapidez::button.link>
Link
<x-heroicon-o-chevron-down class="size-3.5 mt-px" stroke-width="2" />
</x-rapidez::button.link>
<x-rapidez::button.link disabled>
Link disabled
<x-heroicon-o-chevron-down class="size-3.5 mt-px" stroke-width="2" />
</x-rapidez::button.link>
</div>
</div>

<h2 class="font-bold text-2xl mt-5 mb-2">Input components</h2>
<div class="grid grid-cols-1 gap-5 lg:grid-cols-3">
<div>
Expand Down
10 changes: 10 additions & 0 deletions resources/views/components/button/link.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{--
The link button variant, the button doesn't have a background and padding.
Example:
```
<x-rapidez::button.link>Something</x-rapidez::button.link>
```
--}}
<x-rapidez::button.tag {{ $attributes->twMerge('inline-flex items-center gap-x-1.5 transition text-base text-primary no-underline justify-start w-fit cursor-pointer hover:underline disabled:opacity-50 disabled:cursor-not-allowed') }}>
{{ $slot }}
</x-rapidez::button.tag>
10 changes: 5 additions & 5 deletions resources/views/components/readmore/readmore.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

## Changing the line-clamp quantity and using custom read more/less buttons
```
<x-rapidez::readmore>
<x-rapidez::readmore>
<x-slot:slot class="line-clamp-3">
Content
</x-slot:slot>
Expand All @@ -41,18 +41,18 @@
<input type="checkbox" class="hidden peer">
<span {{ $more->attributes->twMerge('inline-flex peer-checked:hidden') }}>
@slotdefault('more')
<span class="hover:underline cursor-pointer flex items-center gap-1 text-primary">
<x-rapidez::button.link tag="span" class="gap-1">
@lang('Read more')
<x-heroicon-o-chevron-down class="size-3.5 mt-px" stroke-width="2" />
</span>
</x-rapidez::button.link>
@endslotdefault
</span>
<span {{ $less->attributes->twMerge('hidden peer-checked:inline-flex') }}>
@slotdefault('less')
<span class="hover:underline cursor-pointer flex items-center gap-1 text-primary">
<x-rapidez::button.link tag="span" class="gap-1">
@lang('Read less')
<x-heroicon-o-chevron-up class="size-3.5 mt-px" stroke-width="2" />
</span>
</x-rapidez::button.link>
@endslotdefault
</span>
</label>
Expand Down
Loading