shelving
Version:
Toolkit for using data in JavaScript.
14 lines (13 loc) • 609 B
TypeScript
/** Text-alignment variants — opt-in modifiers any prose component can mix in via `getAlignClass()`. */
export interface AlignVariants {
/** Align text to the start of the line (LTR: left). */
left?: boolean | undefined;
/** Centre text horizontally. */
center?: boolean | undefined;
/** Align text to the end of the line (LTR: right). */
right?: boolean | undefined;
}
/** Possible alignment strings. */
export type Align = keyof AlignVariants;
/** Get the alignment class for a component. */
export declare function getAlignClass(align: Align | AlignVariants): string | undefined;