calendarThemeOffunction
Reads a design's name, or an older name for one.
Import it
import { calendarThemeOf } from "@johnmorrisdotca/koyomi-calendars/names";
Also exported from: @johnmorrisdotca/koyomi-calendars
Definition
function calendarThemeOf(name: string | null | undefined): CalendarTheme | null
Parameters
| Name | Type | Description |
|---|---|---|
name | string | null | undefined | A theme word, in any case, with spaces round it allowed. |
Returns
"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.
Examples
import { calendarThemeOf } from "@johnmorrisdotca/koyomi-calendars";
console.log(calendarThemeOf(" Squircle "), calendarThemeOf("classic"), calendarThemeOf("nope"));squircle pins nullWhat it prints (run when this page was built)