Events
export default function Increment({ props, view }) {
const clickEvent = view.bind((props, view, item, event) => {
props.increment += 1;
});
return `
<article class="relative card-1 border-bottom ingress">
<div class="wrapper md">
<header class="mb">
<h2 class="headline-2">${props.increment > 0 ? "Incremented" : props.title}</h2>
<p>Has been incremented <strong>${props.increment}</strong> times!</p>
</header>
<a class="button bg-primary sm my-btn" href="#2" onclick="${clickEvent}">Increment +</a>
</div>
</article>
`;
}Last updated