@coreui/react-pro
Version:
UI Components Library for React.js
25 lines (22 loc) • 1.02 kB
JavaScript
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import classNames from '../../_virtual/index.js';
const CFormFeedback = forwardRef((_a, ref) => {
var { children, as: Component = 'div', className, invalid, tooltip, valid } = _a, rest = __rest(_a, ["children", "as", "className", "invalid", "tooltip", "valid"]);
return (React.createElement(Component, Object.assign({ className: classNames({
[`invalid-${tooltip ? 'tooltip' : 'feedback'}`]: invalid,
[`valid-${tooltip ? 'tooltip' : 'feedback'}`]: valid,
}, className) }, rest, { ref: ref }), children));
});
CFormFeedback.propTypes = {
as: PropTypes.elementType,
children: PropTypes.node,
className: PropTypes.string,
invalid: PropTypes.bool,
tooltip: PropTypes.bool,
valid: PropTypes.bool,
};
CFormFeedback.displayName = 'CFormFeedback';
export { CFormFeedback };
//# sourceMappingURL=CFormFeedback.js.map