default定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The flag of Panama (パナマ), PA, drawn again by hand at 4:3 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 640 by 480, 687 B.
The drawing flag("PA", { shape: "4:3" }) uses, made for that shape by hand rather than cut from the flag. The /manifest entry's framings say how each frame was chosen.
インポート
import value from "@johnmorrisdotca/hata/flags/pa.4x3";
定義
const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 480\"><defs><clipPath id=\"hata-pa-4x3-a\"><path fill-opacity=\".7\" d=\"M0 0h640v480H0z\"/></clipPath></defs><g clip-path=\"url(#hata-pa-4x3-a)\"><path fill=\"#fff\" d=\"M0 0h640v480H0z\"/><path fill=\"#fff\" fill-rule=\"evenodd\" d=\"M92.5 0h477.2v480H92.4z\"/><path fill=\"#db0000\" fill-rule=\"evenodd\" d=\"M323 3.6h358v221.7H323z\"/><path fill=\"#0000ab\" fill-rule=\"evenodd\" d=\"M3.2 225.3h319.9V480H3.2zm211.6-47.6-42-29.4-41.7 29.6 15.5-48L105 100l51.6-.4 16-48 16.3 47.9h51.6l-41.5 30 15.9 48z\"/><path fill=\"#d80000\" fill-rule=\"evenodd\" d=\"m516.9 413.9-42.4-27.7-42.1 28 15.6-45.6-42-28 52-.5 16.2-45.4 16.4 45.3h52l-41.8 28.5 16 45.4z\"/></g></svg>"
例
例 1
import square from "@johnmorrisdotca/hata/flags/pa.4x3";
const host=document.createElement("div");
host.innerHTML = square;
console.log(host.querySelector("svg")?.getAttribute("viewBox"));例 2
import { svg } from "@johnmorrisdotca/hata/flags/pa.4x3";
console.log(svg.startsWith("<svg"),svg.length);true 687出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。