-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): #9644 added top position example for ActionBar
- Loading branch information
Showing
5 changed files
with
79 additions
and
6 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
34 changes: 34 additions & 0 deletions
34
projects/demo/src/modules/components/action-bar/examples/3/index.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,34 @@ | ||
<button | ||
size="m" | ||
tuiButton | ||
type="button" | ||
(click)="open.set(true)" | ||
> | ||
Show TableBar on top | ||
</button> | ||
|
||
<tui-action-bar | ||
*tuiActionBar="open()" | ||
size="s" | ||
> | ||
<span [style.width.%]="isMobile() ? 100 : null">Table bar opened</span> | ||
|
||
<button | ||
appearance="glass" | ||
iconStart="@tui.trash" | ||
tuiButton | ||
type="button" | ||
(click)="open.set(false)" | ||
> | ||
Remove | ||
</button> | ||
<button | ||
iconStart="@tui.x" | ||
tuiIconButton | ||
type="button" | ||
[appearance]="isMobile() ? 'glass' : 'icon'" | ||
(click)="open.set(false)" | ||
> | ||
Close | ||
</button> | ||
</tui-action-bar> |
4 changes: 4 additions & 0 deletions
4
projects/demo/src/modules/components/action-bar/examples/3/index.less
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,4 @@ | ||
tui-action-bar { | ||
top: 1rem; | ||
bottom: unset !important; | ||
} |
24 changes: 24 additions & 0 deletions
24
projects/demo/src/modules/components/action-bar/examples/3/index.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {NgIf} from '@angular/common'; | ||
import {Component, inject, signal} from '@angular/core'; | ||
import {toSignal} from '@angular/core/rxjs-interop'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiBreakpointService, TuiButton} from '@taiga-ui/core'; | ||
import {TuiActionBar} from '@taiga-ui/kit'; | ||
import {map} from 'rxjs'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [NgIf, TuiActionBar, TuiButton], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example { | ||
protected open = signal(false); | ||
|
||
protected readonly isMobile = toSignal( | ||
inject(TuiBreakpointService).pipe(map((size) => size === 'mobile')), | ||
); | ||
} |
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