@amsterdam/design-system-react
Version:
All React components from the Amsterdam Design System. Use it to compose pages in your website or application.
14 lines (13 loc) • 762 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/**
* @license EUPL-1.2+
* Copyright Gemeente Amsterdam
*/
import clsx from 'clsx';
import { forwardRef } from 'react';
import { Icon } from '../Icon';
/**
* @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, ...restProps }, ref) => (_jsxs("a", { ...restProps, className: clsx('ams-standalone-link', color && `ams-standalone-link--${color}`, icon && 'ams-standalone-link--with-icon', className), ref: ref, children: [icon && _jsx(Icon, { svg: icon }), children] })));
StandaloneLink.displayName = 'StandaloneLink';