@kadconsulting/dry
Version:
KAD Reusable Component Library
12 lines • 839 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import './HintText.scss';
import classnames from 'classnames';
import { forwardRef, useMemo } from 'react';
const HintText = forwardRef(({ id, className, children, ...props }, ref) => {
const HintTextChildren = useMemo(() =>
/** Use the default text element if the user has passed a simple string */
typeof children === 'string' ? (_jsx("span", { className: 'dry-textInput__hintText__default-text dry-typography dry-typography--weight-regular dry-typography--font-style-normal dry-typography--no-vertical-rhythm', children: children })) : (children), [children]);
return (_jsx("div", { id: id, ref: ref, className: classnames(className, 'dry-textInput__hintText'), ...props, children: HintTextChildren }));
});
export default HintText;
//# sourceMappingURL=HintText.js.map