File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
resources/views/components Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1010 'error-div ' => 'invalid-feedback ' ,
1111 'input-error ' => 'is-invalid ' ,
1212 ],
13+ 'button ' => [
14+ 'button ' => 'btn ' ,
15+ 'indicator-progress ' => ' d-block ' ,
16+ 'spinner-class '
17+ ]
1318 ],
1419];
Original file line number Diff line number Diff line change 1+ <button {{ $attributes -> merge ([' class' => config (' template-components.defult_classes.button.button' )]) } } {{ $attributes } } wire:loading.attr =" disabled" >
2+ <span wire:loading.remove wire:target =" {{ $attributes -> get (' wire:target' ) } }" class =" {{ $attributes -> get (' span-text' ) } }" >
3+ {{ $slot } }
4+ </span >
5+
6+ <div wire:loading wire:target =" {{ $attributes -> get (' wire:target' ) } }" >
7+ <span class =" {{ $attributes -> get (' indicator-progress-class' ) } }" >
8+ {{ $attributes -> get (' loading-text' ) ?? ' Please wait...' } }
9+ <span class =" {{ $attributes -> get (' spinner-class' ) ?? ' spinner-border spinner-border-sm align-middle ms-2' } } {{ config (' template-components.defult_classes.button.spinner-class' ) } }" ></span >
10+ </span >
11+ </div >
12+ </button >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ // test button component
4+
5+ use Illuminate \Support \Facades \View ;
6+
7+ it ('can render button component ' , function () {
8+ $ this ->assertTrue (View::exists ('template-components::button ' ));
9+ });
You can’t perform that action at this time.
0 commit comments