Skip to content

Instantly share code, notes, and snippets.

View sean-perkins's full-sized avatar

Sean Perkins sean-perkins

View GitHub Profile
@sean-perkins
sean-perkins / home.page.ts
Created October 13, 2023 17:36
Registering all icons
import { Component } from '@angular/core';
import { IonContent, IonHeader, IonIcon, IonTitle, IonToolbar } from '@ionic/angular/standalone';
import * as icons from 'ionicons/icons';
import { addIcons } from 'ionicons';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
@sean-perkins
sean-perkins / ContentView.Swift
Created March 22, 2022 17:31
iOS Modal Sheet (SwfitUI)
//
// ContentView.swift
// bottom-sheet
//
// Created by Sean Perkins on 3/22/22.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Home()
@sean-perkins
sean-perkins / collapse-scroll.directive.ts
Last active September 3, 2018 22:35
Ionic 4 (beta.7+) Collapse Scroll Directive
import { Directive, OnDestroy, Input, Renderer2, ElementRef, AfterViewInit } from '@angular/core';
import { Content } from '@ionic/angular';
import { takeUntil, tap } from 'rxjs/operators';
import { Subject } from 'rxjs';
/**
* Usage:
* <example-component [collapseScroll]="content"></example-content>
* Where: content = ion-content reference binding
*/
@Directive({
@sean-perkins
sean-perkins / linearicons.directive.ts
Created September 27, 2017 21:08
Linear Icons Directive for NativeScript Angular
import { Directive, Input, ElementRef } from '@angular/core';
@Directive({
selector: '[lnr]'
})
export class LinearIconsDirective {
private _icon: string;
constructor(private elementRef: ElementRef) { }