This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change current menu to be based on new dropdown module
- Loading branch information
Showing
8 changed files
with
73 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { MenuComponent, MenuTriggerComponent, MenuItemComponent, MenuGroupComponent } from './menu'; | ||
export * from './menu.module'; |
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 @@ | ||
:host { | ||
display: block; | ||
width: 100%; | ||
|
||
@apply p-1; | ||
@apply px-4; | ||
@apply text-secondary; | ||
|
||
display: block; | ||
text-transform: uppercase; | ||
font-size: 0.7rem; | ||
opacity: .7; | ||
} |
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,17 @@ | ||
:host { | ||
@apply block w-full; | ||
|
||
cursor: pointer; | ||
@apply p-2; | ||
@apply px-4 text-primary text-xxs; | ||
font-weight: 500; | ||
|
||
&:hover { | ||
@apply bg-gray-300; | ||
} | ||
|
||
&.disabled { | ||
cursor: not-allowed; | ||
opacity: 0.5; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -36,6 +36,6 @@ div { | |
} | ||
|
||
:host.active { | ||
@apply bg-gray-500; | ||
@apply bg-gray-400; | ||
color: white !important; | ||
} |
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 |
---|---|---|
@@ -1,12 +1,5 @@ | ||
<ng-template [ngIf]="!!trigger"> | ||
|
||
<ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]="trigger!.origin!" [cdkConnectedOverlayOpen]="isOpen" | ||
(detach)="onOverlayClosed()" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" | ||
[cdkConnectedOverlayMinWidth]="minWidth" [cdkConnectedOverlayPositions]="positions" | ||
(overlayOutsideClick)="onOutsideClick($event)"> | ||
<div class="item-list" [@fadeIn] [@fadeOut]> | ||
<ng-content></ng-content> | ||
</div> | ||
</ng-template> | ||
|
||
</ng-template> | ||
<sfng-dropdown externalTrigger="true" #dropdown="sfngDropdown" offsetY="0"> | ||
<div class="flex flex-col flex-grow w-full h-full bg-gray-400 shadow select-none"> | ||
<ng-content></ng-content> | ||
</div> | ||
</sfng-dropdown> |
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,26 @@ | ||
import { OverlayModule } from "@angular/cdk/overlay"; | ||
import { CommonModule } from "@angular/common"; | ||
import { NgModule } from "@angular/core"; | ||
import { SfngDropDownModule } from "../dropdown/dropdown.module"; | ||
import { MenuComponent, MenuGroupComponent, MenuItemComponent, MenuTriggerComponent } from "./menu"; | ||
|
||
@NgModule({ | ||
imports: [ | ||
SfngDropDownModule, | ||
CommonModule, | ||
OverlayModule, | ||
], | ||
declarations: [ | ||
MenuComponent, | ||
MenuGroupComponent, | ||
MenuTriggerComponent, | ||
MenuItemComponent, | ||
], | ||
exports: [ | ||
MenuComponent, | ||
MenuGroupComponent, | ||
MenuTriggerComponent, | ||
MenuItemComponent, | ||
], | ||
}) | ||
export class SfngMenuModule { } |
This file was deleted.
Oops, something went wrong.
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