React Dark Theme
Publisher: AlonsoThemes in package: 1
A dark theme inspired by React website, offering comfortable coding.
A dark theme inspired by React website, offering comfortable coding.
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.line, comment.block, comment.block.documentation, punctuation.definition.comment | #757575 | — |
| constant.numeric, constant.numeric.integer, constant.numeric.integer.binary, constant.numeric.integer.octal, constant.numeric.integer.decimal, constant.numeric.integer.hexadecimal, constant.numeric.integer.other, constant.numeric.float, constant.numeric.float.binary, constant.numeric.float.octal, constant.numeric.float.decimal, constant.numeric.float.hexadecimal, constant.numeric.float.other, constant.numeric.complex, constant.numeric.complex.real, constant.numeric.complex.imaginary, constant.language, constant.character.escape, constant.other.placeholder, constant.other | #C64640 | — |
| entity.name.class, entity.name.struct, entity.name.enum, entity.name.union, entity.name.trait, entity.name.interface, entity.name.impl, entity.name.type, entity.name.class.forward-decl, entity.other.inherited-class, entity.name.namespace, entity.name.constant, entity.name.label, entity.name.tag, entity.other.attribute-name | #FFFFFF | — |
| entity.name.function, entity.name.function.constructor, entity.name.function.destructor | #86D9CA | — |
| entity.name.tag.html | #86D9CA | — |
| entity.name.tag.js, entity.name.tag.tsx | #DFAB5C | — |
| entity.other.attribute-name.html, entity.other.attribute-name.js, entity.other.attribute-name.tsx | #77B7D7 | — |
| entity.name.tag.css, entity.name.tag.less | #86D9CA | — |
| invalid.illegal, invalid.deprecated | #EF4444 | — |
| keyword.control, keyword.control.conditional, keyword.control.import, punctuation.definition.keyword, keyword.other, keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.bitwise, keyword.operator.logical, keyword.operator.word | #77B7D7 | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.bitwise, keyword.operator.logical, keyword.operator.word | #FFFFFF | — |
| markup.bold, markup.italic, markup.underline, markup.inserted, markup.deleted, markup.underline.link, markup.raw.inline, markup.raw.block, markup.other | #77B7D7 | — |
| markup.heading | #77B7D7 | bold |
| markup.list.unnumbered, markup.list.numbered, markup.quote | #FFFFFF | — |
| markup.inline | #DFAB5C | — |
| punctuation.definition.annotation, punctuation.section.block.begin, punctuation.section.block.end, punctuation.section.braces.begin, punctuation.section.braces.end, punctuation.section.group.begin, punctuation.section.group.end, punctuation.section.parens.begin, punctuation.section.parens.end, punctuation.section.brackets.begin, punctuation.section.brackets.end, punctuation.definition.generic.begin, punctuation.definition.generic.end | #FFFFFF | — |
| punctuation.separator, punctuation.terminator, punctuation.separator.continuation, punctuation.accessor | #FFFFFF | — |
| storage.type, storage.modifier, storage.type.function, keyword.declaration.function, storage.type.class, keyword.declaration.class, storage.type.struct, keyword.declaration.struct, storage.type.enum, keyword.declaration.enum, storage.type.union, keyword.declaration.union, storage.type.trait, keyword.declaration.trait, storage.type.interface, keyword.declaration.interface, storage.type.impl, keyword.declaration.impl, storage.type, keyword.declaration.type | #77B7D7 | — |
| storage.type.function.arrow | #FFFFFF | — |
| string.quoted.single, string.quoted.double, string.quoted.triple, string.quoted.other, punctuation.definition.string.begin, punctuation.definition.string.end, string.unquoted, string.regexp, punctuation.section.interpolation.begin, punctuation.section.interpolation.end, source.*language-suffix*.embedded | #977CDC | — |
| string.quoted.single.json, string.quoted.double.json, string.quoted.triple.json, string.quoted.other.json, punctuation.definition.string.begin.json, punctuation.definition.string.end.json, string.unquoted.json, string.regexp.json, punctuation.section.interpolation.begin.json, punctuation.section.interpolation.end.json | #FFFFFF | — |
| support.function, support.module, support.class | #86D9CA | — |
| support.constant | #C64640 | — |
| support.type | #FFFFFF | — |
| support.type.property-name | #77B7D7 | — |
| text.html, text.xml | #FFFFFF | — |
| variable.other, punctuation.definition.variable, variable.other, variable.other.member, variable.function, variable.annotation, punctuation.definition.annotation, variable.object | #77B7D7 | — |
| variable.other.readwrite, variable.other.constant, variable.other.object, variable.language, variable.parameter | #FFFFFF | — |
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}!`;
}