リファレンス
/react
import { … } from "@johnmorrisdotca/hata/react";
最小化と gzip 圧縮をしたサイズは 4757.9 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
BoundFlag | 型 | A flag ready to draw: its SVG with a style that fills the box, its proportions and the name a screen reader says. |
Flag | 関数 | A flag, drawn inline: a <span role="img"> holding the flag's SVG, with the element's box (its height, proportions, round corners, border and shadow). |
FlagProps | 型 | What a binding's flag takes: the same as <hata-flag>'s attributes. |
preloadFlags | 関数 | Load flags before a render that cannot wait: a server render to a string, a static build, the first render on the client that must match it. |
useFlag | 関数 | The flag of a component's props, as a hook: the flag if it is already loaded (preloadFlags), else it is loaded: React 19 suspends until it is, and React 18 draws nothing until an effect has loaded it. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。