components/Text.tsx

once-ui-system/core · packages/core/src/components/Text.tsx · typescript · MIT
ui

Text.tsx from once-ui-system/core

// Source: https://github.com/once-ui-system/core | License: MIT | Copyright 2024-2026 Dopler
// Provided via justclaw.it.com; keep this notice with the code.
import classNames from "clsx";
import {
  type ComponentPropsWithoutRef,
  type ComponentPropsWithRef,
  type ElementType,
  type ForwardedRef,
  forwardRef,
  type ReactNode,
} from "react";

import type { CommonProps, DisplayProps, SpacingProps, TextProps } from "../interfaces";
import type { ColorScheme, ColorWeight, SpacingToken, TextVariant } from "../types";
import { textLayout } from "../utils/layoutClasses";
import { numericSpacingStyle } from "../utils/spacingStyle";

type TypeProps<T extends ElementType> = TextProps<T> &
  CommonProps &
  SpacingProps &
  Omit<DisplayProps, "as"> &
  ComponentPropsWithoutRef<T>;

/**
 * The

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key