This file contains 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
<!DOCTYPE html> | |
<html dir="ltr" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> | |
<title>Stencil Component Starter</title> | |
<script src="/build/mycomponent.js"></script> | |
</head> |
This file contains 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({mutable: true}) isActive = false; |
This file contains 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 } from '@stencil/core'; | |
@Component({ | |
tag: 'my-component', | |
styleUrl: 'my-component.css', | |
shadow: true | |
}) | |
export class MyComponent { | |
@Prop({mutable: true}) isActive = false; |
This file contains 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
.modal { | |
display:none; | |
position: fixed; | |
left: 0; | |
top: 0; | |
width: 100%; | |
height: 100%; | |
overflow: auto; | |
background-color: rgb(0,0,0); | |
background-color: rgba(0,0,0, 0.2); |
This file contains 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 { newE2EPage } from '@stencil/core/testing'; | |
describe('my-component', () => { | |
let page, component, element; | |
beforeEach(async () => { | |
page = await newE2EPage(); | |
await page.setContent('<my-component></my-component>'); | |
component = await page.find('my-component'); |
This file contains 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 } from '@stencil/core'; | |
@Component({ | |
tag: 'my-component', | |
styleUrl: 'my-component.css', | |
shadow: true | |
}) | |
export class MyComponent { | |
render() { | |
return <div class="overlay"> |
This file contains 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
.overlay { | |
opacity: 0; | |
visibility: hidden; | |
position:fixed; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
left: 0; |
This file contains 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
<!DOCTYPE html> | |
<html dir="ltr" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> | |
<title>Stencil Component Starter</title> | |
<script src="/build/mycomponent.js"></script> | |
</head> |
This file contains 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; |
This file contains 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 { newE2EPage } from '@stencil/core/testing'; | |
describe('my-component', () => { | |
let page, component, element; | |
beforeEach(async () => { | |
page = await newE2EPage(); | |
await page.setContent('<my-component></my-component>'); | |
component = await page.find('my-component'); |