@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
18 lines • 1.14 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { pickAriaProps } from '../../utils/aria/aria';
import { TextStyled } from './text.styled';
import { TextTransformType } from './types/transform';
const TextStandAloneComponent = ({ dataTestId = 'text', transform = TextTransformType.NONE, ...props }, ref) => {
const ariaProps = pickAriaProps(props);
return (_jsx(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
*/
export const TextStandAlone = React.forwardRef(TextStandAloneComponent);
//# sourceMappingURL=textStandAlone.js.map