Last active
January 15, 2023 22:36
-
-
Save UpperCod/1b90dcc0628da914ab8c1e077c4d3b56 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