-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(modal): refactor modal component template files
- Loading branch information
Showing
8 changed files
with
65 additions
and
69 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
libs/flowbite-angular/src/lib/components/modal/modal-body.component.html
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,3 @@ | ||
<div class="p-6 space-y-6"> | ||
<ng-content></ng-content> | ||
</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
5 changes: 5 additions & 0 deletions
5
libs/flowbite-angular/src/lib/components/modal/modal-footer.component.html
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 @@ | ||
<div | ||
class="flex items-center p-6 space-x-2 border-t border-gray-200 rounded-b dark:border-gray-600" | ||
> | ||
<ng-content></ng-content> | ||
</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
28 changes: 28 additions & 0 deletions
28
libs/flowbite-angular/src/lib/components/modal/modal-header.component.html
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 @@ | ||
<div | ||
class="flex items-center justify-between p-5 border-b rounded-t dark:border-gray-600" | ||
> | ||
<h3 class="text-xl font-medium text-gray-900 dark:text-white"> | ||
<ng-content></ng-content> | ||
</h3> | ||
<button | ||
type="button" | ||
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white" | ||
data-modal-hide="medium-modal" | ||
(click)="modal.close()" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="w-5 h-5" | ||
fill="currentColor" | ||
viewBox="0 0 20 20" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fill-rule="evenodd" | ||
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" | ||
clip-rule="evenodd" | ||
></path> | ||
</svg> | ||
<span class="sr-only">Close modal</span> | ||
</button> | ||
</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
25 changes: 25 additions & 0 deletions
25
libs/flowbite-angular/src/lib/components/modal/modal.component.html
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,25 @@ | ||
<div | ||
tabindex="-1" | ||
aria-hidden="true" | ||
[ngClass]="{ | ||
hidden: !isOpen | ||
}" | ||
class="fixed top-0 left-0 right-0 z-50 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] md:h-full flex {{ | ||
positionClasses | ||
}}" | ||
(click)="onBackdropClick($event)" | ||
> | ||
<div | ||
class="relative w-full h-full md:h-auto" | ||
[ngClass]="{ | ||
'max-w-md': size === 'sm', | ||
'max-w-lg': size === 'md', | ||
'max-w-4xl': size === 'lg', | ||
'max-w-7xl': size === 'xl' | ||
}" | ||
> | ||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
</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