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

20 lines 1.43 kB
import { jsx as _jsx } from "react/jsx-runtime"; import React from 'react'; import { STYLES_NAME } from '../../constants/stylesName/stylesName'; import { useMediaDevice } from '../../hooks/useMediaDevice/useMediaDevice'; import { useStyles } from '../../hooks/useStyles/useStyles'; import { ErrorBoundary } from '../../provider/errorBoundary/errorBoundary'; import { FallbackComponent } from '../../provider/errorBoundary/fallbackComponent'; import { useGenericComponents } from '../../provider/genericComponents/genericComponentsProvider'; import { NavigationCardStandalone } from './navigationCardStandAlone'; const NavigationCardComponent = React.forwardRef(({ variant, ctv, ...props }, ref) => { const styles = useStyles(STYLES_NAME.NAVIGATION_CARD, variant, ctv); const device = useMediaDevice(); const { LINK } = useGenericComponents(); return (_jsx(NavigationCardStandalone, { ref: ref, component: LINK, device: device, styles: styles, ...props })); }); NavigationCardComponent.displayName = 'NavigationCardComponent'; const NavigationCardBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(NavigationCardStandalone, { ...props, ref: ref }) }), children: _jsx(NavigationCardComponent, { ...props, ref: ref }) })); const NavigationCard = React.forwardRef(NavigationCardBoundary); export { NavigationCard }; //# sourceMappingURL=navigationCard.js.map