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.55 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 { CheckboxWithLabelStandAlone } from './checkboxWithLabelStandAlone'; import { CheckboxWithLabelState } from './types/state'; const CheckboxWithLabelControlledComponent = React.forwardRef(({ state = CheckboxWithLabelState.DEFAULT_SELECTED, ctv, ...props }, ref) => { const stylesCheckboxWithLabel = useStyles(STYLES_NAME.CHECKBOX_WITH_LABEL, props.variant, ctv); return (_jsx(CheckboxWithLabelStandAlone, { ...props, ref: ref, state: state, styles: stylesCheckboxWithLabel })); }); CheckboxWithLabelControlledComponent.displayName = 'CheckboxWithLabelControlledComponent'; const CheckboxWithLabelBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(CheckboxWithLabelStandAlone, { ...props, ref: ref }) }), children: _jsx(CheckboxWithLabelControlledComponent, { ...props, ref: ref }) })); /** * @deprecated This component has been deprecated and will be removed in the next MAJOR release. Will include all this on the CheckBox component */ const CheckboxWithLabelControlled = React.forwardRef(CheckboxWithLabelBoundary); export { CheckboxWithLabelControlled }; //# sourceMappingURL=checkboxWithLabelControlled.js.map