-
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(sidebar): refactor sidebar component template files
- Loading branch information
Showing
6 changed files
with
42 additions
and
39 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
libs/flowbite-angular/src/lib/components/sidebar/sidebar-item-group.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="flex flex-col space-y-2"> | ||
<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
23 changes: 23 additions & 0 deletions
23
libs/flowbite-angular/src/lib/components/sidebar/sidebar-item.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,23 @@ | ||
<a | ||
class="group flex cursor-pointer items-center rounded-lg p-2 text-base font-normal text-gray-900 hover:bg-gray-200 dark:text-white dark:hover:bg-gray-700" | ||
[routerLink]="link" | ||
routerLinkActive="bg-gray-200 dark:bg-gray-700" | ||
[routerLinkActiveOptions]="{ exact: true }" | ||
> | ||
<span | ||
class="flex-shrink-0" | ||
[innerHTML]="icon! | sanitizeHtml" | ||
*ngIf="!!icon" | ||
></span> | ||
<span | ||
class="flex-1 whitespace-nowrap" | ||
[class.ml-3]="!!icon" | ||
*ngIf="(sidebarService.$collapsed | async) === false" | ||
> | ||
<ng-content></ng-content> | ||
</span> | ||
<flowbite-badge | ||
*ngIf="(sidebarService.$collapsed | async) === false && label" | ||
>{{ label }}</flowbite-badge | ||
> | ||
</a> |
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
13 changes: 13 additions & 0 deletions
13
libs/flowbite-angular/src/lib/components/sidebar/sidebar.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,13 @@ | ||
<aside | ||
class="h-full" | ||
[class.w-16]="sidebarService.$collapsed | async" | ||
[class.w-64]="(sidebarService.$collapsed | async) === false" | ||
> | ||
<div | ||
class="flex h-full flex-col space-y-4 divide-y divide-gray-200 overflow-y-auto bg-white py-4 px-3 dark:divide-gray-700 dark:border-gray-700 dark:bg-gray-800" | ||
[class.rounded]="rounded" | ||
[ngClass]="extraClass" | ||
> | ||
<ng-content></ng-content> | ||
</div> | ||
</aside> |
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