Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
v6.0.1 fix demo - migrate sharedstyles to external css to support pro…
Browse files Browse the repository at this point in the history
…d build
  • Loading branch information
clouless committed May 12, 2018
1 parent 89ce763 commit 870d0c3
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion projects/cloukit/toggle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloukit/toggle",
"version": "6.0.1",
"version": "6.0.2",
"peerDependencies": {
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
"@angular/core": "^6.0.0-rc.0 || ^6.0.0",
Expand Down
13 changes: 2 additions & 11 deletions src/app/demo/demo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ import { Component } from '@angular/core';
@Component({
selector: 'cloukit-demo',
templateUrl: './demo.component.html',
styles: [ '.demo { padding:10px; font-family:sans-serif; }'],
styleUrls: [ './demo.styles.css' ]
})
export class DemoComponent {
public static sharedStyles = [
'.row { display: flex; align-items:center; }',
'.label { width:250px; margin-right:10px; }',
'.superButton--ml { margin-left:50px; }',
`.superButton { border:2px solid #710ECC; outline:0; background-color:#710ECC; color:#fff;
border-radius:0px; padding:4px 8px 4px 8px; color:#fff; cursor:pointer; font-size:1rem; }`,
'.superButton:hover, .superButtonSecondary:hover { border:2px solid #710ECC; background-color:#fff; color:#710ECC; }',
];
}
export class DemoComponent { }
30 changes: 30 additions & 0 deletions src/app/demo/demo.styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.demo {
padding:10px;
font-family:sans-serif;
}
.row {
display: flex;
align-items:center;
}
.label {
width:250px;
margin-right:10px;
}
.superButton--ml {
margin-left:50px;
}
.superButton {
border:2px solid #710ECC;
outline:0;
background-color:#710ECC;
color:#fff;
border-radius:0px;
padding:4px 8px 4px 8px;
color:#fff;
cursor:pointer;
font-size:1rem;
}
.superButton:hover {
border:2px solid #710ECC;
background-color:#fff; color:#710ECC;
}
3 changes: 1 addition & 2 deletions src/app/demo/stories/story-00-basic.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Component } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { DemoComponent } from '../demo.component';

@Component({
selector: 'cloukit-story-00-basic',
templateUrl: './story-00-basic.html',
styles: [ ].concat(DemoComponent.sharedStyles),
styleUrls: [ '../demo.styles.css' ]
})
export class Story00Component {

Expand Down
3 changes: 1 addition & 2 deletions src/app/demo/stories/story-01-themed.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { DemoComponent } from '../demo.component';
import { CloukitThemeService } from '@cloukit/theme';
import { CloukitToggleComponentThemeDefault } from '../../../../projects/cloukit/toggle/src/public_api';

Expand All @@ -15,7 +14,7 @@ export class AwesomeToggleTheme extends CloukitToggleComponentThemeDefault {
@Component({
selector: 'cloukit-story-01-themed',
templateUrl: './story-01-themed.html',
styles: [ ].concat(DemoComponent.sharedStyles),
styleUrls: [ '../demo.styles.css' ]
})
export class Story01Component {

Expand Down

0 comments on commit 870d0c3

Please sign in to comment.