Skip to content

Commit

Permalink
docs(design): add docs for DaffMenuComponent (#2840)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Jun 11, 2024
1 parent cd823ad commit df37ff2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
19 changes: 16 additions & 3 deletions apps/design-land/src/app/menu/menu.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<h1 daffArticleTitle>Menu</h1>
<p daffArticleLead>Menus are small floating panels used to add additional information without cluttering a page.</p>
<p daffArticleLead>Menu is a small floating panel used to display a list of actions or navigational items.</p>

<h2>Usage</h2>
<h3>Basic menu</h3>
<h2>Overview</h2>
<p>Menus only appear when a user interacts with a menu activator button. They should be used for secondary actions or options where users don't need immediate access to.</p>

<h2>Basic Menu</h2>
<design-land-example-viewer-container example="basic-menu"></design-land-example-viewer-container>

<h2>Supported Content Types</h2>

<h3>Menu Item</h3>
<p>A menu consists of multiple <code>daff-menu-item</code>s. Menu items should be used with an anchor or button HTML element.</p>

<h3>Icon</h3>
<p>An icon can be added before the content in <code>daff-menu-item</code> by using the <code>daffPrefix</code> selector.</p>

<h3>Menu Activator</h3>
<p>A menu is attached to and triggered by the <code>daffMenuActivator</code> directive.</p>
18 changes: 15 additions & 3 deletions libs/design/menu/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# Menu
Menus are small floating panels used to add additional information without cluttering a page.
Menu is a small floating panel used to display a list of actions or navigational items.

## Usage
## Overview
Menus only appear when a user interacts with a menu activator button. They should be used for secondary actions or options where users don't need immediate access to.

### Basic Menu
## Basic Menu
<design-land-example-viewer-container example="basic-menu"></design-land-example-viewer-container>

## Supported Content Types

### Menu Item
A menu consists of multiple `daff-menu-item`s. Menu items should be used with an anchor or button HTML element.

### Icon
An icon can be added before the content in `daff-menu-item` by using the `daffPrefix` selector.

### Menu Activator
A menu is attached to and triggered by the `daffMenuActivator` directive.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { DaffMenuService } from '../services/menu.service';
})
export class DaffMenuActivatorDirective implements OnDestroy {


private _destroyed$ = new Subject<boolean>();
private _open: boolean;

Expand Down

0 comments on commit df37ff2

Please sign in to comment.