UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

9 lines (8 loc) 539 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { clsx } from 'clsx'; import { forwardRef } from 'react'; import { Icon } from '../Icon'; export const MenuLink = forwardRef(({ children, className, color, icon, ...restProps }, ref) => { return (_jsx("li", { children: _jsxs("a", { ...restProps, className: clsx('ams-menu__link', color && `ams-menu__link--${color}`, className), ref: ref, children: [_jsx(Icon, { className: "ams-menu__icon", svg: icon }), children] }) })); }); MenuLink.displayName = 'Menu.Link';