diff --git a/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.html b/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.html index 848c364..0f0fe38 100644 --- a/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.html +++ b/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.html @@ -1,12 +1,5 @@
- - In progress - -

Demo page

@@ -31,6 +24,8 @@
+ +
Placements:
@@ -38,7 +33,7 @@
+ +
Animations:
@@ -77,12 +74,14 @@
+ +
Custom animation:
-
+
+ +
- Custom animation with inertia:
-
+
+ +
Themes:
@@ -170,4 +175,113 @@
+ + +
+ Custom theme: +
+ + + + + + + +
+ Triggers: +
+ + + mouseenter | focus | click | focusin | manual + + + + + + + + + + + + + + + Click to show tooltip with 'manual' trigger +
diff --git a/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.scss b/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.scss index b2e8102..a975653 100644 --- a/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.scss +++ b/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.scss @@ -23,7 +23,6 @@ transform: translateX(-150px); transition-timing-function: cubic-bezier(0.895, 0.03, 0.685, 0.22); } - } .tui-text_h3 { @@ -48,16 +47,20 @@ t-demo { align-items: center; justify-content: center; width: 100%; - height: 4rem; - background-color: var(--tui-positive); + height: 2.75rem; + background: var(--tui-primary); color: var(--tui-primary-text); font-weight: 600; font-size: 1rem; - border-radius: 1rem; + border-radius: 12px; cursor: pointer; } -.demo-page__custom { +.demo-page__child--placements { + height: 4rem; +} + +.demo-page__grid--long { width: 33%; } @@ -75,3 +78,12 @@ t-demo { .demo-page__child--theme { width: 22%; } + +.demo-page__trigger { + margin-left: 1rem; +} + +.demo-page__manual { + margin-left: 1.5rem; + cursor: pointer; +} diff --git a/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.ts b/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.ts index 9de3c35..03728d2 100644 --- a/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.ts +++ b/projects/ngx-tippy-demo/src/app/pages/demo-page/demo-page.component.ts @@ -1,4 +1,5 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; +import { NgxTippyService } from 'ngx-tippy-wrapper'; const emojis = [ '😄', '😃', @@ -57,6 +58,7 @@ const emojis = [ '😇', '😏', ]; + @Component({ selector: 'app-demo-page', templateUrl: './demo-page.component.html', @@ -156,8 +158,8 @@ export class DemoPageComponent implements OnInit { item: 'perspective', content: emojis[Math.floor(Math.random() * emojis.length)], }, - 'perspective-suble': { - item: 'perspective-suble', + 'perspective-subtle': { + item: 'perspective-subtle', content: emojis[Math.floor(Math.random() * emojis.length)], }, 'perspective-extreme': { @@ -166,7 +168,11 @@ export class DemoPageComponent implements OnInit { }, }; - constructor() {} + constructor(private readonly tippyService: NgxTippyService) {} ngOnInit(): void {} + + showManualTooltip() { + this.tippyService.show('feistyFawn'); + } } diff --git a/projects/ngx-tippy-demo/src/styles/common.scss b/projects/ngx-tippy-demo/src/styles/common.scss index 2aabbeb..3c9d703 100644 --- a/projects/ngx-tippy-demo/src/styles/common.scss +++ b/projects/ngx-tippy-demo/src/styles/common.scss @@ -122,3 +122,9 @@ tui-notification { .nav__link.nav__link--active { color: var(--tui-support-16); } + +.tippy-box[data-theme='pastel'] { + background-color: #7FB069; + color: #fff; + font-weight: 600; +}