Skip to content

Instantly share code, notes, and snippets.

alexnoise79 / _date-selector.scss
Last active Mar 12, 2019
Angular2 date-selector component, made of 3 options
View _date-selector.scss
date-selector {
@include flexbox((display: flex));
width: 100%;
select {
width: auto;
&.month {
@include flex(1 0 auto);
margin: 0 6px;
alexnoise79 / slide-toggle.component.html
Created Mar 14, 2019
Angular 2 Two and Tri state slide toggle component,
View slide-toggle.component.html
<ng-container [ngSwitch]="triState">
<ng-container *ngSwitchCase="true">
<input type="radio" id="mf" class="trigger mf" [value]="false" [(ngModel)]="model" (change)="update(model)" [disabled]="isDisabled">
<label for="mf"></label>
<input id="st_{{formControlName}}_off" [name]="formControlName" type="radio" class="trigger minus" [value]="-1" [(ngModel)]="model" (change)="update(model)" [disabled]="isDisabled">
<label for="st_{{formControlName}}_off">
<div class="pin">
<div class="ink"></div>