calendarThemeOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Reads a design's name, or an older name for one.
インポート
import { calendarThemeOf } from "@johnmorrisdotca/koyomi-calendars/names";
ほかのエクスポート元: @johnmorrisdotca/koyomi-calendars
定義
function calendarThemeOf(name: string | null | undefined): CalendarTheme | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
name | string | null | undefined | A theme word, in any case, with spaces round it allowed. |
戻り値
"pins" | "loops" | "shadow" | "heavy" | "cartoon" | "flip" | "stack" | "line" | "curl" | "soft" | "desk" | "thin" | "frame" | "badge" | "sun" | "roll" | "plain" | "squircle" | null
The design, or null when the word is not one of ours.
例
import { calendarThemeOf } from "@johnmorrisdotca/koyomi-calendars";
console.log(calendarThemeOf(" Squircle "), calendarThemeOf("classic"), calendarThemeOf("nope"));squircle pins null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。