UNPKG

@carbon/react

Version:

React components for the Carbon Design System

20 lines (19 loc) 753 B
/** * Copyright IBM Corp. 2016, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { type ElementType, type ReactElement, type ReactNode } from 'react'; import { PolymorphicComponentPropWithRef, PolymorphicRef } from '../../internal/PolymorphicProps'; import { type TextDir } from '.'; export interface TextBaseProps { dir?: TextDir; children?: ReactNode; } export type TextProps<T extends ElementType> = PolymorphicComponentPropWithRef<T, TextBaseProps>; type TextComponent = <T extends ElementType = 'span'>(props: TextProps<T> & { ref?: PolymorphicRef<T>; }) => ReactElement | null; export declare const Text: TextComponent; export {};