-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor folder structure, add content page
- Loading branch information
1 parent
0e315d3
commit 137149e
Showing
90 changed files
with
434 additions
and
77 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
projects/ngx-tippy-demo/src/app/components/nav/nav.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,26 @@ | ||
import { ViewportScroller } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
import { DestroyService } from '@services'; | ||
import { ScrollComponent } from '@shared'; | ||
|
||
@Component({ | ||
selector: 't-demo-nav', | ||
templateUrl: './nav.component.html', | ||
styleUrls: ['./nav.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
providers: [DestroyService], | ||
}) | ||
export class NavComponent extends ScrollComponent implements OnInit { | ||
public isSublistExpanded: boolean = true; | ||
|
||
constructor( | ||
protected readonly activatedRoute: ActivatedRoute, | ||
protected readonly scroller: ViewportScroller, | ||
protected readonly destroy$: DestroyService | ||
) { | ||
super(activatedRoute, scroller, destroy$); | ||
} | ||
|
||
ngOnInit() {} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -20,5 +20,5 @@ export class SocialComponent implements OnInit { | |
|
||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
ngOnInit() {} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions
22
projects/ngx-tippy-demo/src/app/pages/app-content/_tests/app-content.component.spec.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,22 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AppContentComponent } from '../app-content.component'; | ||
|
||
describe('AppContentComponent', () => { | ||
let component: AppContentComponent; | ||
let fixture: ComponentFixture<AppContentComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [AppContentComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(AppContentComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
151 changes: 151 additions & 0 deletions
151
projects/ngx-tippy-demo/src/app/pages/app-content/app-content.component.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,151 @@ | ||
<div class="app-content"> | ||
|
||
<h1 class="tui-text_h3">Applying content</h1> | ||
|
||
<p class="tui-text_body-m-2">You can pass content for tooltip through:</p> | ||
|
||
<ul class="tui-list"> | ||
<li | ||
*ngFor="let method of contentMethods" | ||
class="tui-list__item" | ||
> | ||
<a | ||
tuiLink | ||
routerLink="/applying-content" | ||
fragment="{{ method.value }}" | ||
(click)="onFragmentNav('data_attribute')" | ||
> | ||
{{ method.view }} | ||
</a> | ||
</li> | ||
</ul> | ||
|
||
<!-- Data attribute --> | ||
|
||
<h6 | ||
id="data_attribute" | ||
class="tui-text_h6" | ||
> | ||
Data attribute | ||
</h6> | ||
|
||
<t-demo-code | ||
*tuiLet="snippets.data_attribute as s" | ||
[snippet]="s.snippet" | ||
[languages]="s.languages" | ||
></t-demo-code> | ||
|
||
<t-demo> | ||
<button | ||
class="tui-button" | ||
size="m" | ||
tuiButton | ||
ngxTippy | ||
[tippyProps]="{ | ||
placement: 'right' | ||
}" | ||
data-tippy-content="Tooltip content" | ||
type="button" | ||
appearance="primary" | ||
> | ||
Button | ||
</button> | ||
</t-demo> | ||
|
||
<!-- Content property --> | ||
|
||
<h6 | ||
id="content_property" | ||
class="tui-text_h6" | ||
> | ||
Content property | ||
</h6> | ||
|
||
<t-demo-code | ||
*tuiLet="snippets.data_content_prop as s" | ||
[snippet]="s.snippet" | ||
[languages]="s.languages" | ||
></t-demo-code> | ||
|
||
<t-demo> | ||
<button | ||
class="tui-button" | ||
size="m" | ||
tuiButton | ||
ngxTippy | ||
[tippyProps]="{ | ||
allowHTML: true, | ||
placement: 'right', | ||
content: '<p>Tooltip <strong>HTML</strong> content</p>' | ||
}" | ||
type="button" | ||
appearance="primary" | ||
> | ||
Button | ||
</button> | ||
</t-demo> | ||
|
||
<!-- ngxTippy directive --> | ||
|
||
<h6 | ||
id="ngxTippy_directive" | ||
class="tui-text_h6" | ||
> | ||
ngxTippy directive | ||
</h6> | ||
|
||
<p class="tui-text_body-m-2">Template driven approach:</p> | ||
|
||
<t-demo-code | ||
*tuiLet="snippets.data_directive_tmpl as s" | ||
[snippet]="s.snippet" | ||
[languages]="s.languages" | ||
></t-demo-code> | ||
|
||
<t-demo> | ||
<button | ||
class="tui-button" | ||
size="m" | ||
tuiButton | ||
ngxTippy="Tooltip content" | ||
[tippyProps]="{ | ||
placement: 'right' | ||
}" | ||
type="button" | ||
appearance="primary" | ||
> | ||
Button | ||
</button> | ||
</t-demo> | ||
|
||
<p class="tui-text_body-m-2">Component driven approach:</p> | ||
|
||
<t-demo-code | ||
*tuiLet="snippets.data_directive_component_1 as s" | ||
[snippet]="s.snippet" | ||
[languages]="s.languages" | ||
></t-demo-code> | ||
|
||
<t-demo-code | ||
*tuiLet="snippets.data_directive_component_2 as s" | ||
[snippet]="s.snippet" | ||
[languages]="s.languages" | ||
></t-demo-code> | ||
|
||
<t-demo> | ||
<button | ||
class="tui-button" | ||
size="m" | ||
tuiButton | ||
[ngxTippy]="content" | ||
[tippyProps]="{ | ||
placement: 'right' | ||
}" | ||
type="button" | ||
appearance="primary" | ||
> | ||
Button | ||
</button> | ||
</t-demo> | ||
|
||
</div> |
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
projects/ngx-tippy-demo/src/app/pages/app-content/app-content.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,30 @@ | ||
import { ViewportScroller } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
import { DestroyService } from '@services'; | ||
import { ScrollComponent } from '@shared'; | ||
import { CONTENT_METHODS } from './constants'; | ||
import { SNIPPETS } from './snippets'; | ||
|
||
@Component({ | ||
selector: 't-demo-app-content', | ||
templateUrl: './app-content.component.html', | ||
styleUrls: ['./app-content.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
providers: [DestroyService], | ||
}) | ||
export class AppContentComponent extends ScrollComponent implements OnInit { | ||
public readonly snippets = SNIPPETS; | ||
public readonly contentMethods = CONTENT_METHODS; | ||
public readonly content = 'Tooltip content'; | ||
|
||
constructor( | ||
protected readonly activatedRoute: ActivatedRoute, | ||
protected readonly scroller: ViewportScroller, | ||
protected readonly destroy$: DestroyService | ||
) { | ||
super(activatedRoute, scroller, destroy$); | ||
} | ||
|
||
ngOnInit() {} | ||
} |
Oops, something went wrong.