SvgXmlLike型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What createFlag needs of react-native-svg's SvgXml: a component that takes the SVG as xml, a size and an accessibility label.
インポート
import type { SvgXmlLike } from "@johnmorrisdotca/hata/react-native";
定義
type SvgXmlLike = ComponentType<{
xml: string;
width: number;
height: number;
accessibilityRole: "image";
accessibilityLabel: string;
}>;
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。