UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

22 lines 1.33 kB
import { jsx as _jsx } from "react/jsx-runtime"; import React from 'react'; import { useStyles } from '../../hooks/useStyles/useStyles'; import { ErrorBoundary } from '../../provider/errorBoundary/errorBoundary'; import { FallbackComponent } from '../../provider/errorBoundary/fallbackComponent'; import { TextCountStandAlone } from './textCountStandAlone'; const TEXT_COUNT_STYLES = 'TEXT_COUNT_STYLES'; const TextCountComponent = React.forwardRef(({ variant, ctv, ...props }, ref) => { const styles = useStyles(TEXT_COUNT_STYLES, variant, ctv); return _jsx(TextCountStandAlone, { ...props, ref: ref, styles: styles }); }); TextCountComponent.displayName = 'TextCountComponent'; const TextCountBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(TextCountStandAlone, { ...props, ref: ref }) }), children: _jsx(TextCountComponent, { ...props, ref: ref }) })); /** * @deprecated This component has been deprecated and will be not exported in the next MAJOR release. * @description * TextCount component is a component that can be used to create a counter of characters. * @param {React.PropsWithChildren<ITextCountControlled>} props * @returns {JSX.Element} */ export const TextCount = React.forwardRef(TextCountBoundary); //# sourceMappingURL=textCount.js.map