-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
15 changed files
with
272 additions
and
5 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,28 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Item; | ||
|
||
use Illuminate\View\Component; | ||
|
||
class Toast extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
* | ||
* @return \Illuminate\Contracts\View\View|\Closure|string | ||
*/ | ||
public function render() | ||
{ | ||
return view('components.item.toast'); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Svg; | ||
|
||
use Illuminate\View\Component; | ||
|
||
class CheckedCircle extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
* | ||
* @return \Illuminate\Contracts\View\View|\Closure|string | ||
*/ | ||
public function render() | ||
{ | ||
return view('components.svg.checked-circle'); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Svg; | ||
|
||
use Illuminate\View\Component; | ||
|
||
class CrossCircle extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
* | ||
* @return \Illuminate\Contracts\View\View|\Closure|string | ||
*/ | ||
public function render() | ||
{ | ||
return view('components.svg.cross-circle'); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Svg; | ||
|
||
use Illuminate\View\Component; | ||
|
||
class ExclamationCircle extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
* | ||
* @return \Illuminate\Contracts\View\View|\Closure|string | ||
*/ | ||
public function render() | ||
{ | ||
return view('components.svg.exclamation-circle'); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Svg; | ||
|
||
use Illuminate\View\Component; | ||
|
||
class Information extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
* | ||
* @return \Illuminate\Contracts\View\View|\Closure|string | ||
*/ | ||
public function render() | ||
{ | ||
return view('components.svg.information'); | ||
} | ||
} |
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,67 @@ | ||
|
||
<div class="absolute bottom-10 right-10" | ||
x-show="toast.show" | ||
x-transition:enter="transition ease-out duration-300" | ||
x-transition:enter-start="opacity-0" | ||
x-transition:enter-end="opacity-100" | ||
x-transition:leave="transition ease-in duration-300" | ||
x-transition:leave-start="opacity-100" | ||
x-transition:leave-end="opacity-0" | ||
> | ||
{{-- Normal Message --}} | ||
<template x-if="toast.type==='normal'"> | ||
|
||
<div x-show="toast.type==='normal'" class="max-w-xs bg-white border rounded-md shadow-lg dark:bg-gray-800 dark:border-gray-700" role="alert"> | ||
<div class="flex p-4"> | ||
<div class="flex-shrink-0"> | ||
<x-svg.information class="h-4 w-4 text-blue-500 mt-0.5"></x-svg.information> | ||
</div> | ||
<div class="ml-3"> | ||
<p class="text-sm text-gray-700 dark:text-gray-400" x-text="toast.message"> </p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
{{-- Success Message --}} | ||
<template x-if="toast.type==='success'"> | ||
<div x-show="toast.type==='success'" class="max-w-xs bg-white border rounded-md shadow-lg dark:bg-gray-800 dark:border-gray-700" role="alert"> | ||
<div class="flex p-4"> | ||
<div class="flex-shrink-0"> | ||
<x-svg.checked-circle class="h-4 w-4 text-green-500 mt-0.5"></x-svg.checked-circle> | ||
</div> | ||
<div class="ml-3"> | ||
<p class="text-sm text-gray-700 dark:text-gray-400" x-text="toast.message"></p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
{{-- Error Message --}} | ||
<template x-if="toast.type==='error'"> | ||
<div x-show="toast.type==='error'" class="max-w-xs bg-white border rounded-md shadow-lg dark:bg-gray-800 dark:border-gray-700" role="alert"> | ||
<div class="flex p-4"> | ||
<div class="flex-shrink-0"> | ||
<x-svg.cross-circle class="h-4 w-4 text-red-500 mt-0.5"></x-svg.cross-circle> | ||
</div> | ||
<div class="ml-3"> | ||
<p class="text-sm text-gray-700 dark:text-gray-400" x-text="toast.message"></p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
{{-- Warning Message --}} | ||
<template x-if="toast.type==='warning'"> | ||
<div x-show="toast.type==='warning'" class="max-w-xs bg-white border rounded-md shadow-lg dark:bg-gray-800 dark:border-gray-700" role="alert"> | ||
<div class="flex p-4"> | ||
<div class="flex-shrink-0"> | ||
<x-svg.cross-circle class="h-4 w-4 text-orange-500 mt-0.5"></x-svg.cross-circle> | ||
</div> | ||
<div class="ml-3"> | ||
<p class="text-sm text-gray-700 dark:text-gray-400" x-text="toast.message"></p> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
</div> |
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,5 @@ | ||
<svg {{ $attributes->merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" width="16" height="16" | ||
fill="currentColor" viewBox="0 0 16 16"> | ||
<path | ||
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/> | ||
</svg> |
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,5 @@ | ||
<svg {{ $attributes->merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" width="16" height="16" | ||
fill="currentColor" viewBox="0 0 16 16"> | ||
<path | ||
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/> | ||
</svg> |
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,5 @@ | ||
<svg {{ $attributes->merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" width="16" | ||
height="16" fill="currentColor" viewBox="0 0 16 16"> | ||
<path | ||
d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/> | ||
</svg> |
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,5 @@ | ||
<svg {{ $attributes->merge(['class' => 'flex-none']) }} xmlns="http://www.w3.org/2000/svg" width="16" height="16" | ||
fill="currentColor" viewBox="0 0 16 16"> | ||
<path | ||
d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/> | ||
</svg> |
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