Skip to content

Commit

Permalink
feat: add components
Browse files Browse the repository at this point in the history
  • Loading branch information
geekmaros committed Aug 29, 2024
1 parent c7894d9 commit 7d92306
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/views/components/form-button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<button {{$attributes->merge(["class"=>"rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"])}}>
{{$slot}}
</button>
4 changes: 4 additions & 0 deletions resources/views/components/form-error.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@props(['name'])
@error($name)
<span class="text-red-500 text-xs font-bold">{{$message}}</span>
@enderror
3 changes: 3 additions & 0 deletions resources/views/components/form-field.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="sm:col-span-4">
{{$slot}}
</div>
5 changes: 5 additions & 0 deletions resources/views/components/form-input.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div
class="flex rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-600 sm:max-w-md">
<input
{{$attributes->merge(["class"=>"block flex-1 border-0 bg-transparent py-1.5 pl-2 text-gray-900 placeholder:text-gray-400 focus:ring-0 sm:text-sm sm:leading-6"])}} type="text">
</div>
1 change: 1 addition & 0 deletions resources/views/components/form-label.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<label {{$attributes->merge(["class"=>"block text-sm font-medium leading-6 text-gray-900"])}} >{{$slot}}</label>

0 comments on commit 7d92306

Please sign in to comment.