@ozen-ui/kit
Version:
React component library
14 lines (13 loc) • 994 B
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { cn } from '../../../../utils/classname';
import { polymorphicComponentWithRef } from '../../../../utils/polymorphicComponentWithRef';
import { Typography } from '../../../Typography';
import { useDataListCardContext } from '../../DataListCardContext';
import { DATA_LIST_CARD_STATUS_TEXT_DEFAULT_TAG } from './constants';
export var cnDataListCardStatusText = cn('DataListCardStatusText');
export var DataListCardStatusText = polymorphicComponentWithRef(function (_a, ref) {
var className = _a.className, children = _a.children, _b = _a.as, as = _b === void 0 ? DATA_LIST_CARD_STATUS_TEXT_DEFAULT_TAG : _b, other = __rest(_a, ["className", "children", "as"]);
var size = useDataListCardContext().size;
return (React.createElement(Typography, __assign({ className: cnDataListCardStatusText('', [className]) }, other, { ref: ref, as: as, color: "primary", variant: "text-".concat(size) }), children));
});