File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
resources/views/components Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,23 @@ He accept all normal attributes of input tag and add some new attributes:
3232- label-class: add class to label tag
3333- other attributes will be added to input tag
3434
35+ ### Button component
36+ ``` html
37+ <x-template-components::button />
38+ ```
39+ He accept all normal attributes of button tag and add some new attributes:
40+ - div-class: add class to div tag
41+ - span-text-class: add class to span tag that contain button text
42+ - indicator-progress-class: add class to span tag that contain button progress indicator
43+ - loading-text: text that will be shown when button is loading
44+ - spinner-class: add class to span tag that contain button spinner
45+ - other attributes will be added to button tag
46+
47+ we support livewire loading state, so if you use livewire you can use loading state like this:
48+ ``` html
49+ <x-template-components::button wire:target =" save" />
50+ ```
51+
3552## Supported Templates
3653
3754- [ Vuexy] ( https://pixinvent.com/demo/vuexy-html-bootstrap-admin-template/html/ltr/vertical-menu-template/dashboard-ecommerce.html )
Original file line number Diff line number Diff line change 1212 ],
1313 'button ' => [
1414 'button ' => 'btn ' ,
15- 'indicator-progress ' => ' d-block ' ,
16- 'spinner-class '
15+ 'indicator-progress ' => 'd-block ' ,
16+ 'spinner-class ' => ' spinner-border spinner-border-sm ' ,
1717 ]
1818 ],
1919];
Original file line number Diff line number Diff line change 11<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' ) } }" >
2+ <span wire:loading.remove wire:target =" {{ $attributes -> get (' wire:target' ) } }" class =" {{ $attributes -> get (' span-text-class ' ) } }" >
33 {{ $slot } }
44 </span >
55
You can’t perform that action at this time.
0 commit comments