added header, footer, eslint/prettier, and typedoc

This commit is contained in:
2024-09-13 17:06:10 +09:00
parent 845418da60
commit a7dc8d6c8f
56 changed files with 16207 additions and 11147 deletions

52
utils/dropDown.ts Normal file
View File

@@ -0,0 +1,52 @@
/**
* Types for DropDown component
* @module utils/dropDown
*/
/**
* Enum for interaction mode of DropDown component
* @enum {string}
*/
export const enum DropDownMode {
onMouseHover = "mousehover",
onClick = "click",
}
/**
* Enum for alignment of DropDown component
* @enum {number}
*/
export const enum DropDownAlignment {
Left,
Right,
}
/**
* Interface for the entry of DropDown menu
* @typedef {object} DropDownEntry
* @property {string} text - Text to be displayed on the menu
* @property {string} link - Hyperlink to the page
*/
interface DropDownEntry {
text: string;
link: string;
}
/**
* Interface for the property of DropDown component
* @typedef {object} DropDownProperty
* @property {string} label - Label of the component
* @property {(DropDownMode | string)} mode - Interaction mode of the component
* @property {Array<DropDownEntry>} entries - Entries of DropDown menu
* @property {boolean} showInMobile - Whether to show the component in mobile(<640px) environemnt
* @property {(DropDownAlignment | number)=} alignment - Explicitly assign the alignment of the component
*/
interface DropDownProperty {
label: string;
mode: DropDownMode | string;
entries: Array<DropDownEntry>;
showInMobile: boolean;
alignment?: DropDownAlignment | number;
}
export type { DropDownProperty, DropDownEntry };