@types/react-world-flags
TypeScript icon, indicating that this package has built-in type declarations

1.4.3 • Public • Published

Installation

npm install --save @types/react-world-flags

Summary

This package contains type definitions for react-world-flags (https://github.com/smucode/react-world-flags#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-world-flags.

index.d.ts

// Type definitions for react-world-flags 1.4
// Project: https://github.com/smucode/react-world-flags#readme
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as React from "react";

export interface FlagProps extends React.HTMLProps<HTMLImageElement> {
    /**
     * code is the two letter, three letter or three digit country code.
     */
    code?: string | undefined;

    /**
     * You can also pass an optional fallback which renders if the given code doesn't correspond to a flag
     */
    fallback?: React.ReactNode | null | undefined;
}

/**
 * Easy to use SVG flags of the world for react
 */
declare const Flag: React.FC<FlagProps>;

export default Flag;

Additional Details

  • Last updated: Wed, 27 Sep 2023 07:12:04 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

Weekly Downloads

9,786

Version

1.4.3

License

MIT

Unpacked Size

4.31 kB

Total Files

5

Last publish

Collaborators

  • types