NativeFlagProps型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a native flag takes: <hata-flag>'s code, shape, fit, label, lang, date, variant, which and allowRestricted, and a size
(small, medium, large or a number of points, 24 by default) for its height, or a width.
インポート
import type { NativeFlagProps } from "@johnmorrisdotca/hata/react-native";
定義
type NativeFlagProps = Pick<FlagProps, "code" | "shape" | "fit" | "label" | "lang" | "date" | "variant" | "which" | "allowRestricted" | "size" | "width">;
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
variant (省略可) | string | undefined | Which of the place's flags in real use to draw, by its |
date (省略可) | string | Date | undefined | The day whose flag to draw: |
allowRestricted (省略可) | boolean | undefined | Draw a flag whose display the law restricts (Germany's of 1935 to 1945), for history and education. Without it nothing is drawn. |
shape (省略可) | "flag" | "4:3" | "1:1" | "round" | "own" | undefined |
|
fit (省略可) | Fit | undefined | How it fits a frame: |
label (省略可) | string | undefined | What a screen reader says. Left out, the place's name in |
code | string | The flag's code, in any case: "JP", "jp-13", "CA-ON", "DE-BY". |
size (省略可) | string | number | undefined | Its height: |
width (省略可) | string | number | undefined | A width in pixels, with the height following the flag's proportions; overrides |
which (省略可) | FlagRole | undefined | With |
lang (省略可) | "en" | "ja" | undefined |
|
例
import type { NativeFlagProps } from "@johnmorrisdotca/hata/react-native";
const props: NativeFlagProps = { code: "JP", size: "medium", label: "Japan" };
console.log(props.code);JP出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。