@patreon/studio
Version:
Patreon Studio Design System
24 lines (23 loc) • 938 B
TypeScript
import type { AriaAttributes } from 'react';
import type { ValueOrResponsive } from '~/utilities/opaque-responsive';
import type { BaseProps, ChildrenProps, StylableProps } from './component';
import type { TextColorToken } from './tokens';
export interface TextElementProps {
/** Element to render. */
as?: 'span' | 'p' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
}
export interface TextColorProps {
/**
* Color token to set the color of the text.
*/
color?: 'inherit' | TextColorToken;
}
export interface TextLayoutProps {
/**
* Align text
*/
align?: ValueOrResponsive<'left' | 'center' | 'right'>;
/** enabled flag or number representing the number of lines to show */
ellipsis?: boolean | 1 | 2 | 3 | 4 | 5 | 6 | 7;
}
export type ComponentTextProps = TextElementProps & TextColorProps & TextLayoutProps & AriaAttributes & BaseProps & StylableProps & ChildrenProps;