Skip to content

Instantly share code, notes, and snippets.

@fokusov
Last active January 24, 2017 20:54
Show Gist options
  • Save fokusov/ad45b787350104cc087fe06ebe5d8a39 to your computer and use it in GitHub Desktop.
Save fokusov/ad45b787350104cc087fe06ebe5d8a39 to your computer and use it in GitHub Desktop.
app/social-share-button/social-share-button.component.html
// app/social-share-button/social-share-button.component.html
import {
Component,
Input
} from '@angular/core';
import { TNSFontIconModule } from 'nativescript-ng2-fonticon';
@Component({
selector: 'social-share-button',
templateUrl: 'social-share-button/social-share-button.component.html',
styleUrls: ['social-share-button/social-share-button.component.css']
})
export class SocialShareButtonComponent {
@Input('size') size = 75;
@Input('shareIcons') shareIcons: string[];
public get mainIconSize(): number {
return this.size * 0.45;
}
public get shareButtonSize(): number {
return this.size * 0.55;
}
public get shareIconSize(): number {
return this.shareButtonSize * 0.5;
}
public get viewHeight(): number {
return this.size + this.shareButtonSize * 1.2;
}
public get viewWidth(): number {
return this.size + this.shareButtonSize * 2.2;
}
constructor(private fonticon: TNSFontIconModule) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment