@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
24 lines • 1.47 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextStandAlone = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = __importDefault(require("react"));
const aria_1 = require("../../utils/aria/aria");
const text_styled_1 = require("./text.styled");
const transform_1 = require("./types/transform");
const TextStandAloneComponent = ({ dataTestId = 'text', transform = transform_1.TextTransformType.NONE, ...props }, ref) => {
const ariaProps = (0, aria_1.pickAriaProps)(props);
return ((0, jsx_runtime_1.jsx)(text_styled_1.TextStyled, { ...props, ...ariaProps, ref: ref, "$maxTruncatedLines": props.maxTruncatedLines, "$transform": transform, "$truncate": props.truncate, align: props.align, as: props.component, content: undefined, "data-testid": dataTestId, htmlFor: props.htmlFor, id: props.id, isDisabled: props.isDisabled, role: props.role, styles: props.styles, weight: props.weight, onClick: props.onClick, children: props.children }));
};
/**
* @description
* Text component is a component that can be used to create a text.
* @param {React.PropsWithChildren<ITextStandAlone>} props
* @returns {JSX.Element}
* @constructor
*/
exports.TextStandAlone = react_1.default.forwardRef(TextStandAloneComponent);
//# sourceMappingURL=textStandAlone.js.map