-
-
Save martinandersen3d/55b38d44a621887f11e6fc38b5416d11 to your computer and use it in GitHub Desktop.
atomico-example
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 { c, html } from "atomico"; // 3.0kB | |
function component({ name }) { | |
return html`<host shadowDom>Hello, ${name}</host>`; | |
} | |
component.props = { | |
name: String, | |
}; | |
customElements.define("my-component", c(component)); |
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 { c } from "atomico"; // 2.5kB | |
function component({ name }) { | |
return <host shadowDom>Hello, {name}</host>; | |
} | |
component.props = { | |
name: String, | |
}; | |
customElements.define("my-component", c(component)); |
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 { Props, c, html } from "atomico"; // 3.0kB | |
function component({ name }:Props<component.props>) { | |
return html`<host shadowDom>Hello, ${name}</host>`; | |
} | |
component.props = { | |
name: String, | |
}; | |
customElements.define("my-component", c(component)); |
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 { Props, c } from "atomico"; // 2.5kB | |
function component({ name }:Props<component.props>) { | |
return <host shadowDom>Hello, {name}</host>; | |
} | |
component.props = { | |
name: String, | |
}; | |
customElements.define("my-component", c(component)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment