@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
19 lines • 1.2 kB
JavaScript
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 { EmptyStateStandAlone } from './emptyStateStandAlone';
const EmptyStateComponent = React.forwardRef(({ ctv, ...props }, ref) => {
const styles = useStyles(STYLES_NAME.EMPTY_STATE, props.variant, ctv);
return _jsx(EmptyStateStandAlone, { ...props, ref: ref, styles: styles?.[props.state] });
});
EmptyStateComponent.displayName = 'EmptyStateComponent';
const EmptyStateBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(EmptyStateStandAlone, { ...props, ref: ref }) }), children: _jsx(EmptyStateComponent, { ...props, ref: ref }) }));
/**
* @deprecated This component has been deprecated and will be removed in the next MAJOR release.
*/
const EmptyState = React.forwardRef(EmptyStateBoundary);
export { EmptyState };
//# sourceMappingURL=emptyState.js.map