UNPKG

@elacity-js/uikit

Version:

React / Material UI Design kit for Elacity project

24 lines (21 loc) 946 B
import { __rest } from '../node_modules/tslib/tslib.es6.js'; import { jsx } from 'react/jsx-runtime'; import React__default from 'react'; import { baseURL } from '@elacity-js/lib'; import Link$2 from '@mui/material/Link'; import { Link as Link$1, NavLink as NavLink$1 } from 'react-router-dom'; // see https://mui.com/material-ui/guides/composition/#caveat-with-refs const RouterLink = React__default.forwardRef((_a, ref) => { var { to } = _a, props = __rest(_a, ["to"]); return (jsx(Link$1, Object.assign({ ref: ref }, props, { to: baseURL(to) }))); }); const NavLink = (_a) => { var { to } = _a, props = __rest(_a, ["to"]); return (jsx(NavLink$1, Object.assign({}, props, { to: baseURL(to) }))); }; const Link = (_a) => { var { href } = _a, props = __rest(_a, ["href"]); return (jsx(Link$2, Object.assign({}, props, { href: baseURL(href) }))); }; export { Link, NavLink, RouterLink }; //# sourceMappingURL=Link.js.map