UNPKG

@amsterdam/design-system-react

Version:

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

12 lines (11 loc) 883 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { ChevronForwardIcon } from '@amsterdam/design-system-react-icons'; import { clsx } from 'clsx'; import { forwardRef } from 'react'; import { Icon } from '../Icon'; // The `ams-standalone-link--with-icon` class is @deprecated and will be removed in a future release. /** * @see {@link https://designsystem.amsterdam/?path=/docs/components-navigation-standalone-link--docs Standalone Link docs at Amsterdam Design System} */ export const StandaloneLink = forwardRef(({ children, className, color, icon = ChevronForwardIcon, ...restProps }, ref) => (_jsxs("a", { ...restProps, className: clsx('ams-standalone-link ams-standalone-link--with-icon', color && `ams-standalone-link--${color}`, className), ref: ref, children: [_jsx(Icon, { svg: icon }), children] }))); StandaloneLink.displayName = 'StandaloneLink';