UNPKG

adwaita-web

Version:

A GTK inspired toolkit designed to build awesome web apps

28 lines (27 loc) 1.37 kB
import React from "react"; import type { ExtendElementProps } from "../utils/extendElementProp"; export declare type TextProps<P extends keyof JSX.IntrinsicElements = "p"> = ExtendElementProps<P, React.PropsWithChildren<{ as?: P; size?: "mini" | "small" | "medium" | "large" | "huge" | "mega"; weight?: 100 | 300 | 400 | 700 | 900; className?: string; align?: "left" | "center" | "right"; fill?: boolean | "left" | "right"; hero?: boolean; muted?: boolean; info?: boolean; success?: boolean; warning?: boolean; danger?: boolean; italic?: boolean; bold?: boolean; noSelect?: boolean; /** * Makes this component grow to fill the available space, requires the * container to be a flexbox to work. */ grow?: boolean | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 999; }>>; export declare function Text<P extends keyof JSX.IntrinsicElements = "p">({ children, className, size, align, weight, fill, hero, muted, info, success, warning, danger, italic, bold, noSelect, grow, as, ...rest }: TextProps<P>): React.ReactElement<{ className: string; } & Omit<TextProps<P>, "bold" | "className" | "children" | "align" | "fill" | "grow" | "size" | "danger" | "info" | "success" | "warning" | "muted" | "italic" | "noSelect" | "weight" | "as" | "hero">, string | React.JSXElementConstructor<any>>;