Skip to content

Instantly share code, notes, and snippets.

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/5e7ce8fcb48346df5535da1215d2a59f to your computer and use it in GitHub Desktop.
Save StefanNieuwenhuis/5e7ce8fcb48346df5535da1215d2a59f to your computer and use it in GitHub Desktop.
import { Component } from '@stencil/core';
@Component({
tag: 'my-component',
styleUrl: 'my-component.css',
shadow: true
})
export class MyComponent {
@Prop({mutable: true}) isActive = false;
render() {
return <div class={'modal ' + (this.isActive ? 'active' : '')}>
<div class="modal__content">
<a href="javascript:;">&times;</a>
<div class="modal__content-body">Lorem ipsum...</div>
</div>
</div>;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment