Last active
April 12, 2019 14:31
-
-
Save StefanNieuwenhuis/cf62bced76ee6080cc1e02facdcf1b8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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