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

18 lines 1.3 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 { useGenericComponents } from '../../provider/genericComponents/genericComponentsProvider'; import { VideoStandAlone } from './videoStandAlone'; const VideoControlledComponent = React.forwardRef(({ variant, ctv, ...props }, ref) => { const variantStyles = useStyles(STYLES_NAME.VIDEO, variant, ctv); const { LINK: genericLinkComponent } = useGenericComponents(); return (_jsx(VideoStandAlone, { ...props, ref: ref, componentLink: genericLinkComponent, styles: variantStyles })); }); VideoControlledComponent.displayName = 'VideoControlledComponent'; const VideoBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(VideoStandAlone, { ...props, ref: ref }) }), children: _jsx(VideoControlledComponent, { ...props, ref: ref }) })); const VideoControlled = React.forwardRef(VideoBoundary); export { VideoControlled }; //# sourceMappingURL=videoControlled.js.map