@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
20 lines • 1.43 kB
JavaScript
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 { ConfirmationMessageStandAlone } from './confirmationMessageStandAlone';
import { ConfirmationMessageStateType } from './types/state';
const CONFIRMATION_MESSAGE_STYLES = 'CONFIRMATION_MESSAGE_STYLES';
const ConfirmationMessageComponent = React.forwardRef(({ state = ConfirmationMessageStateType.SUCCESS, variant, ctv, ...props }, ref) => {
const styles = useStyles(CONFIRMATION_MESSAGE_STYLES, variant, ctv);
return _jsx(ConfirmationMessageStandAlone, { ...props, ref: ref, stylesState: styles[state] });
});
ConfirmationMessageComponent.displayName = 'ConfirmationMessageComponent';
const ConfirmationMessageBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(ConfirmationMessageStandAlone, { ...props, ref: ref }) }), children: _jsx(ConfirmationMessageComponent, { ...props, ref: ref }) }));
/**
* @deprecated This component has been deprecated and will be removed in the next MAJOR release.
*/
const ConfirmationMessage = React.forwardRef(ConfirmationMessageBoundary);
export { ConfirmationMessage };
//# sourceMappingURL=confirmationMessage.js.map