This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
clouless
committed
Oct 22, 2017
1 parent
0b91d23
commit 27ea95a
Showing
8 changed files
with
141 additions
and
27 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*! | ||
* @license MIT | ||
* Copyright (c) 2017 Bernhard Grünewaldt - codeclou.io | ||
* https://github.com/cloukit/legal | ||
*/ | ||
import { | ||
CloukitComponentTheme, | ||
CloukitStatefulAndModifierAwareElementThemeStyleDefinition, | ||
} from '@cloukit/theme'; | ||
|
||
/** | ||
* The default theme | ||
*/ | ||
export class CloukitTooltipComponentThemeDefault extends CloukitComponentTheme { | ||
|
||
constructor() { | ||
super(); | ||
// | ||
// NOTE: A margin-* of 5px will be added for wrapper.ready.base on component creation. | ||
// this cannot be overridden by the theme! Since the placement influences top/bottom/left/right | ||
// | ||
this.createStyle('wrapper', 'init', 'base', { | ||
style: { | ||
transition: ` | ||
margin-left 200ms linear, | ||
margin-right 200ms linear, | ||
margin-bottom 200ms linear, | ||
margin-top 200ms linear, | ||
opacity 200ms ease-in-out`, | ||
opacity: 0, | ||
} | ||
} as CloukitStatefulAndModifierAwareElementThemeStyleDefinition); | ||
|
||
this.createStyle('wrapper', 'ready', 'base', | ||
this.merge(this.getStyle('wrapper', 'init', 'base'), { | ||
style: { | ||
opacity: 1, | ||
} | ||
} as CloukitStatefulAndModifierAwareElementThemeStyleDefinition)); | ||
|
||
this.createStyle('tooltip', 'init', 'base', { | ||
style: { | ||
backgroundColor: '#333', | ||
padding: '4px', | ||
color: '#fff', | ||
} | ||
} as CloukitStatefulAndModifierAwareElementThemeStyleDefinition); | ||
|
||
this.createStyle('tooltip', 'ready', 'base', | ||
this.merge(this.getStyle('tooltip', 'init', 'base'), { | ||
style: { | ||
} | ||
} as CloukitStatefulAndModifierAwareElementThemeStyleDefinition)); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { DemoComponent } from './demo.component'; | ||
import { CloukitTooltipModule } from '../index'; | ||
import { CloukitDropoutModule } from '@cloukit/dropout'; | ||
import { CloukitThemeModule } from '@cloukit/theme'; | ||
import { CloukitTooltipModule } from '../index'; | ||
import { DemoComponent } from './demo.component'; | ||
|
||
@NgModule({ | ||
declarations: [ DemoComponent ], | ||
exports: [ DemoComponent ], | ||
imports: [ CommonModule, CloukitTooltipModule, CloukitDropoutModule ], | ||
imports: [ | ||
CommonModule, | ||
CloukitThemeModule, | ||
CloukitTooltipModule, | ||
CloukitDropoutModule, | ||
], | ||
providers: [ ], | ||
bootstrap: [ ] | ||
}) | ||
export class DemoModule { | ||
} | ||
export class DemoModule {} |