-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(business/header): add back documentation
- Loading branch information
Rombolà Gianluca
committed
Sep 5, 2019
1 parent
9e0f990
commit 64c360e
Showing
4 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
projects/angular-showcase/src/app/business/examples/examples.module.ts
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,8 +1,10 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { HeaderModule } from '@sbb-esta/angular-business'; | ||
|
||
@NgModule({ | ||
declarations: [], | ||
imports: [CommonModule] | ||
imports: [CommonModule, HeaderModule] | ||
}) | ||
export class ExamplesModule {} |
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
32 changes: 32 additions & 0 deletions
32
projects/sbb-esta/angular-business/src/lib/header/header.md
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,32 @@ | ||
# Header Overview | ||
|
||
Import header module in your application | ||
|
||
```ts | ||
import { HeaderModule } from '@sbb-esta/angular-business'; | ||
``` | ||
|
||
The header will appear at the top of the screen in a fixed position, and provide a container for navigation, usermenu, and eventually a logo. | ||
It supports <a> and <button> tags for navigation. Optionally an <sbb-usermenu> can be provided, as well as any element with a [brand] property, or .brand class, for replacing the standard logo. | ||
|
||
```html | ||
<sbb-header [label]="Title" [subtitle]="Subtitle" [environment]="dev" [environmentColor]="red"> | ||
<a routerLink="/">A tag</a> | ||
<button sbbNavbutton type="button" [sbbDropdown]="dropdown">Button tag</button> | ||
<button sbbNavbutton type="button">Button tag with dropdown</button> | ||
<sbb-dropdown #dropdown="sbbDropdown"> | ||
<a sbbDropdownItem routerLink="/navigation1/section1" routerLinkActive="sbb-selected" | ||
>Option 1</a | ||
> | ||
<a sbbDropdownItem routerLink="/navigation1/section2" routerLinkActive="sbb-selected" | ||
>Option 2</a | ||
> | ||
</sbb-dropdown> | ||
<sbb-usermenu ...> | ||
<!-- A usermenu can be optionally included --> | ||
</sbb-usermenu> | ||
<svg brand> | ||
<!-- A logo can be optionally included --> | ||
</svg> | ||
</sbb-header> | ||
``` |
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