UNPKG

@yuntijs/ui

Version:

☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps

14 lines 565 B
import { LinkPlugin as LexicalLinkPlugin } from '@lexical/react/LexicalLinkPlugin'; import { validateUrl } from "../../utils/url"; import { jsx as _jsx } from "react/jsx-runtime"; export default function LinkPlugin(_ref) { var _ref$hasLinkAttribute = _ref.hasLinkAttributes, hasLinkAttributes = _ref$hasLinkAttribute === void 0 ? false : _ref$hasLinkAttribute; return /*#__PURE__*/_jsx(LexicalLinkPlugin, { attributes: hasLinkAttributes ? { rel: 'noopener noreferrer', target: '_blank' } : undefined, validateUrl: validateUrl }); }