calendarIcon関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
An original calendar-page SVG for a month, day and optional year. The library does not read the clock.
The design comes from options.theme (pins when it is left out). Importing this function brings in all 18 designs; to carry one, import its calendarIcon from themes/<name>.
インポート
import { calendarIcon } from "@johnmorrisdotca/koyomi-calendars";
定義
function calendarIcon(options: CalendarIconOptions): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
options | CalendarIconOptions | The date ( |
戻り値
string
The icon as SVG text, <svg …>…</svg>. It throws a RangeError for a theme, housing, size or turn that is not one of ours.
例
import { calendarIcon } from "@johnmorrisdotca/koyomi-calendars";
const svg = calendarIcon({ theme: "squircle", month: 11, day: 3, year: 2026, scheme: "dark" });
console.log(svg.startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。