Component for rendering texts from dictionary.

Hierarchy

Constructors

  • Parameters

    Returns Text

  • Parameters

    Returns Text

Methods

  • Adds the dictionary to the default dictionary.

    Parameters

    • dictionary: {
          [key: string]: string;
      }

      Dictionary data.

      • [key: string]: string

    Returns Text

  • Adds the dictionary to the specific key.

    Parameters

    • key: string

      Key of the dictionary.

    • dictionary: {
          [key: string]: string;
      }

      Dictionary data.

      • [key: string]: string

    Returns Text

  • Registers function to the text.

    Parameters

    • name: string

      Name of the function.

    • fn: ((...args: any[]) => string)

      Called function.

        • (...args): string
        • Parameters

          • Rest...args: any[]

          Returns string

    Returns Text

  • Formats the text.

    Parameters

    • text: string

      Text to format.

    • Rest...args: any[]

      Arguments for text format.

    Returns string

  • Formats the text with HTML converted to JSX.

    Parameters

    • text: string

      Text to format.

    • Rest...args: any[]

      Arguments for text format.

    Returns Element

  • Gets the text from the dictionary.

    Type Parameters

    • T = any

    Parameters

    • key: keyof T

      Key of the text in the dictionary.

    • Rest...args: any[]

      Arguments for text format.

    Returns string

    T - Type of the dictionary object -> typeof { key: 'value' }.

  • Gets the text from the dictionary as JSX object. All HTML in the text is converted to JSX.

    Type Parameters

    • T = any

    Parameters

    • key: keyof T

      Key of the text in the dictionary.

    • Rest...args: any[]

      Arguments for text format.

    Returns Element

    T - Type of the dictionary object -> typeof { key: 'value' }.