Profectus / features/clickables/clickable
features/clickables/clickable ​
This is a feature that represents something that can be clicked or held down to perform some action. There can be some requirement required to be able to click as well. This is a pretty generic feature and several other features use this component indirectly.
ts
const numClicks = persistent(0);
const clickable = createClickable(() => ({
display: {
description: "",
title: "Something you can click"
},
onClick: () => numClicks.value++
}));