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

28 lines 1.35 kB
import { jsx as _jsx } from "react/jsx-runtime"; import React from 'react'; import { STYLES_NAME } from '../../constants/stylesName/stylesName'; import { useStyles } from '../../hooks/useStyles/useStyles'; import { ErrorBoundary } from '../../provider/errorBoundary/errorBoundary'; import { FallbackComponent } from '../../provider/errorBoundary/fallbackComponent'; import { DividerStandAlone } from './dividerStandAlone'; const DividerComponent = React.forwardRef(({ variant, ctv, ...props }, ref) => { const styles = useStyles(STYLES_NAME.DIVIDER, variant, ctv); return _jsx(DividerStandAlone, { ...props, ref: ref, styles: styles }); }); DividerComponent.displayName = 'DividerComponent'; const DividerBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(DividerStandAlone, { ...props, ref: ref }) }), children: _jsx(DividerComponent, { ...props, ref: ref }) })); const Divider = React.forwardRef(DividerBoundary); /** * @description * Divider component is a wrapper component that can be used to wrap other components. * * @param {React.PropsWithChildren<IDivider<V>>} props * @returns {JSX.Element} * @constructor * @example * <Divider variant="divider" /> * <Divider variant="divider" orientation="vertical" /> * */ export { Divider }; //# sourceMappingURL=divider.js.map