UNPKG

@huluvu424242/honey-papercss-style

Version:
31 lines (28 loc) 937 B
import { r as registerInstance, g as getAssetPath, h } from './index-cdfb42db.js'; const HoneyPapercssStyle = class { constructor(hostRef) { registerInstance(this, hostRef); } connectedCallback() { // add class paper to body let classes = document.body.getAttribute("class"); if (classes === null) classes = "paper"; if (classes.search("paper") < 0) { classes += " paper"; } document.body.setAttribute("class", classes); } disconnectedCallback() { // remove class paper from body let classes = document.body.getAttribute("class"); classes = classes.replace("paper", ""); document.body.setAttribute("class", classes); } render() { const stylePath = getAssetPath('./assets/paper.min.css'); return h("link", { rel: "stylesheet", href: stylePath }); } static get assetsDirs() { return ["assets"]; } }; export { HoneyPapercssStyle as honey_papercss_style };