Changeset View
Changeset View
Standalone View
Standalone View
components/navbar/navbar.html.js
const Component = require('../component.class'); | const Component = require('../component.class'); | ||||
const Navbar = new Component({ | class Navbar extends Component { | ||||
renderFn: ({ title }) => { | renderFn(s, { title }) { | ||||
return /* HTML */ ` | return /* HTML */ ` | ||||
<nav>${title}</nav> | <nav>${title}</nav> | ||||
`; | `; | ||||
}, | } | ||||
propsControls: { | static propsControls() { | ||||
title: 'text', | return { | ||||
}, | title: { label: 'Title', control: 'text' }, | ||||
}); | }; | ||||
} | |||||
} | |||||
module.exports = Navbar; | module.exports = Navbar; |