notion-enhancer/src/extensions/outliner/islands/Heading.mjs
dragonwocky 44c480062b
chore: update to support notion 2.3.1 (regex-based replacement for updated webpack bundles)
removed use strict from mjs files, where strict mode is assumed/enforced regardless
2024-02-24 20:57:22 +11:00

24 lines
671 B
JavaScript

/**
* notion-enhancer: outliner
* (c) 2024 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (https://notion-enhancer.github.io/) under the MIT license
*/
function Heading({ indent, ...props }, ...children) {
const { html } = globalThis.__enhancerApi;
return html`<div
role="button"
class="notion-enhancer--outliner-heading block
relative cursor-pointer select-none text-[14px]
decoration-(2 [color:var(--theme--fg-border)])
hover:bg-[color:var(--theme--bg-hover)]
py-[6px] pr-[2px] pl-[${indent * 18}px]
underline-(~ offset-4) last:mb-[24px]"
...${props}
>
${children}
</div>`;
}
export { Heading };