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.09 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 { TagStandAlone } from './tagStandAlone'; const TagComponent = React.forwardRef(({ variant, ctv, ...props }, ref) => { const styles = useStyles(STYLES_NAME.TAG_V2, variant, ctv); return _jsx(TagStandAlone, { ...props, ref: ref, styles: styles }); }); TagComponent.displayName = 'TagComponent'; const TagBoundary = (props, ref) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(TagStandAlone, { ...props, ref: ref }) }), children: _jsx(TagComponent, { ...props, ref: ref }) })); const Tag = React.forwardRef(TagBoundary); /** * @description * Tag component is used to highlight or categorize important information. */ export { Tag as TagV2 }; //# sourceMappingURL=tag.js.map