# Types
# DataFrame
export class DataFrame {
columns: string[];
data: { [key: string]: number | string }[];
constructor(columns: string[], data: { [key: string]: number | string }[]) {
this.columns = columns;
this.data = data;
}
}
# Informative Context
export type InformativeContext = {
show: () => void,
hide: () => void,
}
# Text Field Type
export enum TextFieldType {
email = "email",
password = "password",
text = "text",
number = "number",
tel = "tel",
url = "url",
}
# Text Field Context
export type TextFieldContext = {
value: () => string,
validate: () => void,
focus: () => void,
setError: (message: string) => void,
}
# Text Field Validator
export type TextFieldValidator = (value: string) => string;
# Dropdown Item
export type DropdownItem = {
label: string,
value: string,
colour?: string,
}
# Dropdown Alignment
export enum DropdownAlignment {
left = "ltr",
right = "rtl"
}
# Dropdown Position
export enum DropdownPosition {
top = "top",
bottom = "bottom",
left = "left",
right = "right"
}
# Colours
export enum Colours {
primary = "primary",
accent = "accent",
success = "success",
danger = "danger",
warning = "warning",
}
# Theme
export enum Theme {
light = "light",
dark = "dark",
}
← Compose