@airplane/views
Version:
A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.
56 lines (55 loc) • 3.4 kB
TypeScript
import { Ref } from "react";
import { LabelProps, TextProps } from "./Text.types";
/**
* Text component.
*
* Renders text but also supports Markdown.
*/
export declare const Text: import("react").ForwardRefExoticComponent<{
disableMarkdown?: boolean | undefined;
} & {
children: import("react").ReactNode;
size?: import("@mantine/core").MantineSize | undefined;
color?: import("../theme/colors").Color | undefined;
lineClamp?: number | undefined;
weight?: import("../theme/typography").FontWeight | undefined;
transform?: import("csstype").Property.TextTransform | undefined;
align?: import("csstype").Property.TextAlign | undefined;
italic?: boolean | undefined;
underline?: boolean | undefined;
strikethrough?: boolean | undefined;
sx?: import("@mantine/core").CSSObject | undefined;
} & import("../layout/layout.types").CommonLayoutProps & import("../styling.types").CommonStylingProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color" | "transform" | "lineClamp" | "weight" | "children" | "italic" | "underline" | "strikethrough" | "ref" | "size" | "align" | "sx" | "disableMarkdown" | keyof import("../layout/layout.types").CommonLayoutProps | keyof import("../styling.types").CommonStylingProps> & import("react").RefAttributes<HTMLDivElement>>;
type TextWithoutRefProps = TextProps & {
innerRef: Ref<HTMLDivElement>;
};
/**
* Text component without ref forwarding.
*
* This component is exported for documentation purposes. It should not be used.
* */
export declare const TextWithoutRef: ({ disableMarkdown, children, size, innerRef, ...props }: TextWithoutRefProps) => import("react/jsx-runtime").JSX.Element;
/** Text without automatic formatting like Markdown and paragraph-like margins **/
export declare const Label: import("react").ForwardRefExoticComponent<{
children: import("react").ReactNode;
size?: import("@mantine/core").MantineSize | undefined;
color?: import("../theme/colors").Color | undefined;
lineClamp?: number | undefined;
weight?: import("../theme/typography").FontWeight | undefined;
transform?: import("csstype").Property.TextTransform | undefined;
align?: import("csstype").Property.TextAlign | undefined;
italic?: boolean | undefined;
underline?: boolean | undefined;
strikethrough?: boolean | undefined;
sx?: import("@mantine/core").CSSObject | undefined;
} & import("../layout/layout.types").CommonLayoutProps & import("../styling.types").CommonStylingProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color" | "transform" | "lineClamp" | "weight" | "children" | "italic" | "underline" | "strikethrough" | "ref" | "size" | "align" | "sx" | keyof import("../layout/layout.types").CommonLayoutProps | keyof import("../styling.types").CommonStylingProps> & import("react").RefAttributes<HTMLDivElement>>;
type LabelWithoutRefProps = LabelProps & {
innerRef: Ref<HTMLDivElement>;
};
/**
* Label component without ref forwarding.
*
* This component is exported for documentation purposes. It should not be used.
*/
export declare const LabelWithoutRef: ({ className, style, size, innerRef, children, color, weight, width, height, grow, ...props }: LabelWithoutRefProps) => import("react/jsx-runtime").JSX.Element;
export {};