extml
Version:
Converts html tagged templates to ExtJS component object.
66 lines (59 loc) • 1.57 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Converts html tagged templates to ExtJS component object</title>
</head>
<body>
<script type="module">
import {h} from '../dist/extml.es.js'
export function StartDate(props) {
//console.log(props)
//language=html
return h`
<datefield value="${new Date()}"/>
`
}
export function EndDate() {
//language=html
return h`
<datefield value="${new Date()}"/>
`
}
export function RetrieveButton() {
//language=html
return h`
<button ui="action" value="Click me"/>
`
}
export function ContainerFoo() {
//language=html
return h`
<container oninitialize="${() => {}}"/>
`
}
export function StatsLabel() {
//language=html
return h`
<label html="Stats"/>
`
}
export function MyToolbar() {
//language=html
return h`
<toolbar docked="right" style="background: #fff" onpainted="${() => {}}">
<${StartDate} option="${123}"/>
<${EndDate}/>
<${ContainerFoo}>
${`<div>aa</div>`}
${`<div>bb</div>`}
<${StatsLabel}/>
</>
<${RetrieveButton}/>
</toolbar>
`
}
console.log(MyToolbar())
</script>
</body>
</html>