Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · /react-native

SvgXmlLiketype

What createFlag needs of react-native-svg's SvgXml: a component that takes the SVG as xml, a size and an accessibility label.

Import it

import type { SvgXmlLike } from "@johnmorrisdotca/hata/react-native";

Definition

type SvgXmlLike = ComponentType<{
    xml: string;
    width: number;
    height: number;
    accessibilityRole: "image";
    accessibilityLabel: string;
}>;

Examples

import { createElement } from "react";
import { createFlag, type SvgXmlLike } from "@johnmorrisdotca/hata/react-native";

const stand: SvgXmlLike = (props) => createElement("svg", { "aria-label": props.accessibilityLabel });
console.log(typeof createFlag(stand)); // "function"
function

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.31.0.