Skip to content

Instantly share code, notes, and snippets.

View khola's full-sized avatar
Working from home

kuba holak khola

Working from home
View GitHub Profile
import { Component, OnInit, ViewEncapsulation, Input, HostListener, EventEmitter, Output } from "@angular/core";
selector: "custom-message",
template: `
<p [class]="type">
styles: [
khola / basic-component.html
Created April 27, 2018 11:40
Basic component
<template id="my-custom-component">
<script type="text/javascript">
class MyCustomComponent extends HTMLElement {
constructor() {
const template = document.getElementById('my-custom-component');
const templateContent = template.content;
import { Component, Prop, State } from '@stencil/core';
tag: 'my-custom-button',
styleUrl: 'my-custom-button.scss'
export class MyCustomButtonComponent {
@Prop() myCustomAttribute: string;
@State() checked: boolean;