@slashid/react
Version:
React SDK for the /id platform
24 lines • 916 B
TypeScript
import * as styles from "./text.css";
import { TextConfig } from "./types";
export type Props<TC extends TextConfig> = {
t?: keyof TC;
children?: React.ReactNode;
tokens?: Record<string, string>;
as?: "h1" | "h2" | "h3" | "p";
variant?: styles.TextVariants;
className?: string;
};
type InternalProps = Props<TextConfig>;
/**
* Basic text component, used to display text in the application.
* In order to get type safe text, you need to provide a TextConfig type.
* Text will be interpolated - i.e. any {{key}} will be replaced with the value that matches the key in the provided tokens prop.
*
* The intent is that the actual text keys & values are provided by the consuming application.
*
* @example
* Check the <Text> component in the @slashid/react package for more information.
*/
export declare const Text: React.FC<InternalProps>;
export {};
//# sourceMappingURL=index.d.ts.map