Nitrogenous Polymorphic Molecule

    @types/ink-big-text
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.1 • Public • Published

    Installation

    npm install --save @types/ink-big-text

    Summary

    This package contains type definitions for ink-big-text (https://github.com/sindresorhus/ink-big-text).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ink-big-text.

    index.d.ts

    // Type definitions for ink-big-text 1.2
    // Project: https://github.com/sindresorhus/ink-big-text
    // Definitions by: aaronleopold <https://github.com/aaronleopold>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    import * as React from 'react';
    
    // note: BigTextProps.colors are based on cfonts (https://github.com/dominikwilkowski/cfonts). I will have commented out
    // some of the accepted inputs. Becuase it also allows for hex colors, I decided to not narrow it down
    // from a string type. A regex would be VERY useful here, but is unfortunately unsupported
    // (see this issue: https://github.com/Microsoft/TypeScript/issues/6579). I will happily update this type if
    // this feature ever gets added! That way the colors[] will be typed as any of the accepted colors OR a valid hex color.
    // However until then, the type will be string.
    
    // The official cfont docs state the following would be accepted (in addition to any valid hex):
    // type DefinedColors =
    //     | 'system'
    //     | 'black'
    //     | 'red'
    //     | 'green'
    //     | 'yellow'
    //     | 'blue'
    //     | 'magenta'
    //     | 'cyan'
    //     | 'white'
    //     | 'gray'
    //     | 'redBright'
    //     | 'greenBright'
    //     | 'yellowBright'
    //     | 'blueBright'
    //     | 'magentaBright'
    //     | 'cyanBright'
    //     | 'whiteBright';
    
    interface BigTextProps {
        text: string;
        font?:
            | 'block'
            | 'slick'
            | 'tiny'
            | 'grid'
            | 'pallet'
            | 'shade'
            | 'simple'
            | 'simpleBlock'
            | '3d'
            | 'simple3d'
            | 'chrome'
            | 'huge' | undefined;
        align?: 'left' | 'center' | 'right' | undefined;
        colors?: string[] | undefined;
        backgroundColor?: 'transparent' | 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | undefined;
        letterSpacing?: number | undefined;
        lineHeight?: number | undefined;
        space?: boolean | undefined;
        maxLength?: number | undefined;
    }
    
    declare const BigText: React.FC<BigTextProps>;
    export = BigText;

    Additional Details

    • Last updated: Thu, 08 Jul 2021 14:23:12 GMT
    • Dependencies: @types/react
    • Global values: none

    Credits

    These definitions were written by aaronleopold.

    Keywords

    none

    Install

    npm i @types/ink-big-text

    DownloadsWeekly Downloads

    153

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    6.74 kB

    Total Files

    4

    Last publish

    Collaborators

    • types