drawGuidePiece関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A piece of the guide (SUIDO_PIECE_GUIDE) as SVG text: its tiny board drawn by drawSuido, with the water in it where the guide says
the picture has some, and the piece's name as its description for a screen reader. style puts the board's style inside the drawing, so it
stands alone as an image.
インポート
import { drawGuidePiece } from "@johnmorrisdotca/suido/draw";
定義
function drawGuidePiece(piece: GuidePiece, options?: { style?: boolean; label?: string; }): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
piece | GuidePiece | A guide piece with its example layout and caption. |
options (省略可) | { style?: boolean; label?: string; } | Drawing, mounting or generator choices specified by the signature. |
戻り値
string
A piece of the guide (SUIDO_PIECE_GUIDE) as SVG text: its tiny board drawn by drawSuido, with the water in it where the guide says the picture has some, and the piece's name as its description for a screen reader. style puts the board's style inside the drawing, so it stands alone as an image.
例
import { drawGuidePiece } from "@johnmorrisdotca/suido/draw";
import { SUIDO_PIECE_GUIDE } from "@johnmorrisdotca/suido";
console.log(drawGuidePiece(SUIDO_PIECE_GUIDE[0]).startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。