@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
22 lines • 1.71 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RadioButtonGroupControlled = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = __importDefault(require("react"));
// styles
const useStyles_1 = require("../../hooks/useStyles/useStyles");
const errorBoundary_1 = require("../../provider/errorBoundary/errorBoundary");
const fallbackComponent_1 = require("../../provider/errorBoundary/fallbackComponent");
const radioButtonGroupStandAlone_1 = require("./radioButtonGroupStandAlone");
const STYLES_NAME = 'RADIO_BUTTON_GROUP_STYLES';
const RadioButtonGroupControlledComponent = react_1.default.forwardRef(({ variant, ctv, ...props }, ref) => {
const styles = (0, useStyles_1.useStyles)(STYLES_NAME, variant, ctv);
return (0, jsx_runtime_1.jsx)(radioButtonGroupStandAlone_1.RadioButtonGroupStandAlone, { ref: ref, styles: styles, variant: variant, ...props });
});
RadioButtonGroupControlledComponent.displayName = 'RadioButtonGroupControlledComponent';
const RadioButtonGroupBoundary = (props, ref) => ((0, jsx_runtime_1.jsx)(errorBoundary_1.ErrorBoundary, { fallBackComponent: (0, jsx_runtime_1.jsx)(fallbackComponent_1.FallbackComponent, { children: (0, jsx_runtime_1.jsx)(radioButtonGroupStandAlone_1.RadioButtonGroupStandAlone, { ...props, ref: ref }) }), children: (0, jsx_runtime_1.jsx)(RadioButtonGroupControlledComponent, { ...props, ref: ref }) }));
exports.RadioButtonGroupControlled = react_1.default.forwardRef(RadioButtonGroupBoundary);
//# sourceMappingURL=radioButtonGroupControlled.js.map