Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions adev/src/content/examples/aria/menu/src/menu-context/app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@
font-size: 0.875rem;
}

.last-action {
display: flex;
align-items: center;
gap: 0.5rem;
margin: 0;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
border: 1px solid var(--border-color);
font-size: 0.875rem;
animation: fade-in 0.2s ease;
}

.last-action .material-symbols-outlined {
font-size: 1.1rem;
color: var(--vivid-pink);
}

@keyframes fade-in {
from {
opacity: 0;
transform: translateY(-4px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

[ngMenu] .separator {
border-top: 1px solid var(--border-color);
margin: 0.25rem 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Right-click inside this area to open the context menu.
</div>

@if (lastAction()) {
<p class="last-action">
<span class="material-symbols-outlined" translate="no" aria-hidden="true">check_circle</span>
Action performed: <strong>{{ lastAction() }}</strong>
</p>
}

<!-- Hidden trigger positioned dynamically at cursor coordinates -->
<div
#triggerEl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ export class App {
this.trigger().open();
}

lastAction = signal<string | null>(null);

onItemSelected(value: string) {
console.log(`Action selected: ${value}`);
this.lastAction.set(value);
}

onOverlayKeydown(event: KeyboardEvent) {
Expand Down
Loading