@easyx.ai/dumi-theme-easyxai
Version:
@easyx.ai/dumi-theme-easyxai 是为 dumi2 打造的一款文档站主题包,提供了更加美观、易用的研发与阅读体验
43 lines • 1.64 kB
JavaScript
import Popover from 'antd/es/popover';
import { PopoverContent } from "./components/PopoverContent";
import defaultConfig from "./defaultConfig.json";
import "./index.css";
import { useStyles } from "./style";
import { getLang } from "./utils";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
export var AppNavIcon = function AppNavIcon() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var lang = props.lang || getLang();
var _useStyles = useStyles(),
styles = _useStyles.styles;
var _props$config = props.config,
config = _props$config === void 0 ? defaultConfig : _props$config;
return /*#__PURE__*/_jsx("div", {
className: styles.root,
children: /*#__PURE__*/_jsx(Popover, {
arrow: false,
trigger: props.trigger,
placement: "bottomLeft",
content: /*#__PURE__*/_jsx(PopoverContent, {
lang: lang,
config: config
}),
overlayClassName: styles.popover,
children: /*#__PURE__*/_jsx("div", {
className: styles.wrapper,
children: /*#__PURE__*/_jsxs("svg", {
width: "20",
height: "20",
fill: "none",
children: [/*#__PURE__*/_jsx("title", {
children: "close"
}), /*#__PURE__*/_jsx("path", {
d: "M2.5 5H5V2.5H2.5V5zM5 11.25H2.5v-2.5H5v2.5zm12.5 0H15v-2.5h2.5v2.5zm-8.75 0h2.5v-2.5h-2.5v2.5zM5 17.5H2.5V15H5v2.5zm10 0h2.5V15H15v2.5zm-3.75 0h-2.5V15h2.5v2.5zM17.5 5H15V2.5h2.5V5zM8.75 5h2.5V2.5h-2.5V5z",
fill: "currentColor"
})]
})
})
})
});
};