Skip to content

Instantly share code, notes, and snippets.

@StefanNieuwenhuis
Last active April 12, 2019 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StefanNieuwenhuis/cf62bced76ee6080cc1e02facdcf1b8a to your computer and use it in GitHub Desktop.
Save StefanNieuwenhuis/cf62bced76ee6080cc1e02facdcf1b8a to your computer and use it in GitHub Desktop.
import { Component, Prop } from '@stencil/core';
@Component({
tag: 'my-component',
styleUrl: 'my-component.css',
shadow: true
})
export class MyComponent {
@Prop() open = false;
@Prop() transparent = false;
public render() {
return <div class={'overlay ' + (this.open ? 'is-visible' : '') + ' ' + (this.transparent ? 'is-transparent' : '')}>
<div class="modal-window">
<div class="modal-window__content"><slot></slot></div></div>
</div>;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment