@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.48 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TagV2 = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = __importDefault(require("react"));
const stylesName_1 = require("../../constants/stylesName/stylesName");
const useStyles_1 = require("../../hooks/useStyles/useStyles");
const errorBoundary_1 = require("../../provider/errorBoundary/errorBoundary");
const fallbackComponent_1 = require("../../provider/errorBoundary/fallbackComponent");
const tagStandAlone_1 = require("./tagStandAlone");
const TagComponent = react_1.default.forwardRef(({ variant, ctv, ...props }, ref) => {
const styles = (0, useStyles_1.useStyles)(stylesName_1.STYLES_NAME.TAG_V2, variant, ctv);
return (0, jsx_runtime_1.jsx)(tagStandAlone_1.TagStandAlone, { ...props, ref: ref, styles: styles });
});
TagComponent.displayName = 'TagComponent';
const TagBoundary = (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)(tagStandAlone_1.TagStandAlone, { ...props, ref: ref }) }), children: (0, jsx_runtime_1.jsx)(TagComponent, { ...props, ref: ref }) }));
const Tag = react_1.default.forwardRef(TagBoundary);
exports.TagV2 = Tag;
//# sourceMappingURL=tag.js.map