UNPKG

design-react-kit

Version:

Componenti React per Bootstrap 5

18 lines 740 B
import React from 'react'; import classNames from 'classnames'; export const Forward = ({ className, children, testId, ...attributes }) => { const classes = classNames(className, 'forward'); return (React.createElement("a", { className: classes, onClick: (e) => { e.preventDefault(); if (attributes.href) { const scrollToRef = document.querySelector(attributes.href); if (scrollToRef) { scrollToRef.scrollIntoView({ behavior: 'smooth', block: 'start' }); } } }, "data-testid": testId, ...attributes }, children)); }; //# sourceMappingURL=Forward.js.map