Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. // app/social-share-button/social-share-button.component.html
  2.  
  3. import {
  4. Component,
  5. Input
  6. } from '@angular/core';
  7. import { TNSFontIconModule } from 'nativescript-ng2-fonticon';
  8.  
  9. @Component({
  10. selector: 'social-share-button',
  11. templateUrl: 'social-share-button/social-share-button.component.html',
  12. styleUrls: ['social-share-button/social-share-button.component.css']
  13. })
  14. export class SocialShareButtonComponent {
  15. @Input('size') size = 75;
  16. @Input('shareIcons') shareIcons: string[];
  17.  
  18. public get mainIconSize(): number {
  19. return this.size * 0.45;
  20. }
  21.  
  22. public get shareButtonSize(): number {
  23. return this.size * 0.55;
  24. }
  25.  
  26. public get shareIconSize(): number {
  27. return this.shareButtonSize * 0.5;
  28. }
  29.  
  30. public get viewHeight(): number {
  31. return this.size + this.shareButtonSize * 1.2;
  32. }
  33.  
  34. public get viewWidth(): number {
  35. return this.size + this.shareButtonSize * 2.2;
  36. }
  37.  
  38.  
  39. constructor(private fonticon: TNSFontIconModule) {}
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement