Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(experimental): add
tui-avatar-labeled
(#6523)
- Loading branch information
Showing
12 changed files
with
118 additions
and
0 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
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
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/experimental/avatar/examples/6/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 @@ | ||
<tui-avatar-labeled> | ||
<tui-avatar | ||
[src]="'https://avatars.githubusercontent.com/u/10106368' | tuiFallbackSrc: 'tuiIconUserLarge' | async" | ||
></tui-avatar> | ||
|
||
<div tuiFade>MarsiBarsi</div> | ||
</tui-avatar-labeled> | ||
|
||
<tui-avatar-labeled> | ||
<tui-avatar | ||
[src]="'https://avatars.githubusercontent.com/u/11832552' | tuiFallbackSrc: 'tuiIconUserLarge' | async" | ||
></tui-avatar> | ||
|
||
<div tuiFade>Inkin</div> | ||
<div tuiFade>Alexander</div> | ||
</tui-avatar-labeled> | ||
|
||
<tui-avatar-labeled> | ||
<tui-avatar | ||
[src]="'https://avatars.githubusercontent.com/u/46284632' | tuiFallbackSrc: 'tuiIconUserLarge' | async" | ||
></tui-avatar> | ||
|
||
<div tuiFade>Potekhin</div> | ||
<div tuiFade>Vladimir</div> | ||
</tui-avatar-labeled> | ||
|
||
<tui-avatar-labeled> | ||
<tui-avatar | ||
[src]="'https://avatars.githubusercontent.com/u/35179038' | tuiFallbackSrc: 'tuiIconUserLarge' | async" | ||
></tui-avatar> | ||
|
||
<div tuiFade>Barsukov</div> | ||
<div tuiFade>Nikita</div> | ||
</tui-avatar-labeled> |
8 changes: 8 additions & 0 deletions
8
projects/demo/src/modules/experimental/avatar/examples/6/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,8 @@ | ||
:host { | ||
display: flex; | ||
gap: 1rem; | ||
} | ||
|
||
tui-avatar { | ||
border: 1px solid var(--tui-base-04); | ||
} |
12 changes: 12 additions & 0 deletions
12
projects/demo/src/modules/experimental/avatar/examples/6/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,12 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
|
||
@Component({ | ||
selector: 'tui-avatar-example-6', | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export class TuiAvatarExample6 {} |
10 changes: 10 additions & 0 deletions
10
projects/experimental/components/avatar-labelled/avatar-labeled.component.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,10 @@ | ||
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'tui-avatar-labeled', | ||
template: '<ng-content></ng-content>', | ||
styleUrls: ['./avatar-labeled.styles.less'], | ||
encapsulation: ViewEncapsulation.None, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class TuiAvatarLabeledComponent {} |
9 changes: 9 additions & 0 deletions
9
projects/experimental/components/avatar-labelled/avatar-labeled.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {NgModule} from '@angular/core'; | ||
|
||
import {TuiAvatarLabeledComponent} from './avatar-labeled.component'; | ||
|
||
@NgModule({ | ||
declarations: [TuiAvatarLabeledComponent], | ||
exports: [TuiAvatarLabeledComponent], | ||
}) | ||
export class TuiAvatarLabeledModule {} |
19 changes: 19 additions & 0 deletions
19
projects/experimental/components/avatar-labelled/avatar-labeled.styles.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,19 @@ | ||
tui-avatar-labeled { | ||
display: flex; | ||
width: 3.5rem; | ||
box-sizing: content-box; | ||
flex-direction: column; | ||
text-align: center; | ||
align-items: center; | ||
line-height: 0.895rem; | ||
font-size: 0.75rem; | ||
padding: 0 0.5rem; | ||
|
||
tui-avatar { | ||
margin-bottom: 0.375rem; | ||
} | ||
|
||
[tuiFade] { | ||
width: calc(100% + 1rem); | ||
} | ||
} |
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,2 @@ | ||
export * from './avatar-labeled.component'; | ||
export * from './avatar-labeled.module'; |
5 changes: 5 additions & 0 deletions
5
projects/experimental/components/avatar-labelled/ng-package.json
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,5 @@ | ||
{ | ||
"lib": { | ||
"entryFile": "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