vuepress-theme-hope
Version:
A light vuepress theme with tons of features
23 lines • 824 B
JavaScript
import { defineComponent, h } from "vue";
import { PrintIcon } from "@theme-hope/components/info/icons";
import { useMetaLocale } from "@theme-hope/composables/info/useMetaLocale";
import { useTheme } from "@theme-hope/composables/useTheme";
import "../../styles/info/print-button.scss";
export default defineComponent({
name: "PrintButton",
setup() {
const metaLocale = useMetaLocale();
const theme = useTheme();
return () => theme.value.print === false
? null
: h("button", {
type: "button",
class: "print-button",
title: metaLocale.value.print,
onClick: () => {
globalThis.print();
},
}, h(PrintIcon));
},
});
//# sourceMappingURL=PrintButton.js.map