Kawa
Publisher: imnyangThemes in package: 2
A soft pink VS Code theme based on the Kawa color palette.
A soft pink VS Code theme based on the Kawa color palette.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment, punctuation.definition.comment | #a9a9b1 | italic |
| keyword, storage, storage.type, storage.modifier | #f9b1dc | — |
| keyword.operator | #d9c5ce | — |
| entity.name.type, support.type, storage.type.class | #c9b0d9 | — |
| constant, constant.language, support.constant | #c9b0d9 | — |
| variable, variable.parameter, meta.definition.variable | #d9c5ce | — |
| entity.name.function, support.function, meta.function-call | #f4ba9f | — |
| string, string.quoted | #d6a6b8 | — |
| constant.numeric, constant.character | #e1b68f | — |
| entity.name.tag, support.class.component | #f9b1dc | — |
| entity.other.attribute-name | #c9b0d9 | — |
| markup.underline.link, string.other.link | #f9b1dc | — |
| invalid, invalid.illegal | #b42318 | — |
| markup.inserted | #7da889 | — |
| markup.deleted | #b42318 | — |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}