Sugar Theme
Publisher: LibonThemes in package: 9
Sugar theme for Visual Studio Code
Sugar theme for Visual Studio Code
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, string.comment, punctuation.definition.comment | #A0ADA0 | — |
| support, property, variable, identifier, attribute.name, custom.variable, custom.punctuation, meta.property-value.scss, support.variable.property, entity.name.function.scss, keyword.operator.gradient, meta.at-rule.keyframe.less, meta.function-call.arguments, support.type.custom-property, punctuation.definition.custom-property.less | #A97844 | — |
| entity.other.attribute-name.html.vue | #998418 | — |
| support.variable, variable.language | #A97844 | — |
| constant, entity.name.constant, meta.definition.variable, constant.character.escape, keyword.operator.or.regexp, punctuation.definition.group, keyword.operator.quantifier.regexp, punctuation.definition.character-class.regexp | #B56959 | — |
| meta.group.regexp, keyword.control.anchor.regexp, constant.other.character-class | #B56959 | — |
| string, source.ini, markup.underline.link, meta.embedded.assembly, meta.attribute-selector.scss, constant.other.color.rgb-value, support.constant.property-value, string punctuation.section.embedded source | #B56959 | — |
| constant.language, meta.module-reference | #1E754F | — |
| number, constant.numeric, keyword.other.unit, meta.at-rule.keyframes.scss, entity.other.keyframe-offset, entity.other.attribute-name.scss, source.css.less keyword.other.keyframe-selector.less | #2F798A | — |
| variable.parameter.misc.css, variable.parameter.url.scss, entity.other.attribute-name, punctuation.definition.entity, meta.at-rule.utility.body.tailwind, invalid.deprecated.entity.other.attribute-name, entity.other.attribute-name.parent-selector-suffix | #998418 | — |
| entity.other.attribute-name.id, entity.other.attribute-name.class, punctuation.definition.entity.css | #998418 | — |
| meta.property-name, meta.function-call.less, variable.other.property, meta.object-literal.key, keyword.other.definition, meta.definition.property, variable.object.property, support.variable.property, support.constant.property, variable.other.enummember, variable.other.object.property, variable.other.constant.property, constant.language.import-export-all | #998418 | — |
| source.coffee.embedded, support.type.property-name.css, support.type.property-name.less, support.type.vendor-prefix.less, support.type.vendored.property-name.css, keyword.other.keyframe-selector.less, support.type.property-name.media, meta.at-rule.media.header.css, meta.property-value.css, entity.name.tag.custom.css, entity.name.tag.custom.scss, meta.at-rule.keyframe.less, variable.other.constant.animation-name, support.constant.vendored.property-value.css | #998418 | — |
| constant.language.null, constant.language.undefined | #AB5959 | — |
| entity.name.tag | #1E754F | — |
| entity.name.tag.template, entity.name.tag.script, entity.name.tag.style, entity.name.tag.route | #AB5959 | — |
| entity.name.tag.yaml, keyword.other.definition.ini, support.type.property-name.json | #998418 | — |
| storage.type, markup.heading, storage.modifier, entity.name.section.markdown, variable.other.link.underline, keyword.operator.logic, keyword.operator.logical.and, keyword.operator.logical.scss, keyword.operator.logical.python, keyword.operator.logical.feature, punctuation.definition.template-expression | #AB5959 | — |
| keyword, constant.character, keyword.operator.new, storage.type.class.jsdoc, keyword.operator.instanceof, keyword.operator.expression, support.type.object.module.js | #1E754F | — |
| entity, entity.name, support.function, meta.function-call, entity.name.function, variable.language.super, entity.name.operator.custom-literal, source.powershell variable.other.member | #59873A | — |
| meta.class, support.class, entity.name.namespace, entity.name.type.class, entity.name.type.module, support.class.component, entity.other.inherited-class | #5A6AA6 | — |
| support.type, meta.function, entity.name.type, meta.type.parameters, meta.type.annotation, meta.namespace.declaration, storage.type.generic.wildcard, variable.language.relations.prisma | #2E808F | — |
| storage.type.error, storage.type.string, storage.type.symbol, storage.type.numeric, storage.type.boolean, support.type.builtin, support.type.primitive | #1E754F | — |
| meta.jsx.children, meta.embedded.block.html | #24292E | — |
| keyword.operator.ternary, keyword.operator.logical, keyword.operator.bitwise, keyword.operator.increment, keyword.operator.decrement, keyword.operator.relational, keyword.operator.comparison, keyword.operator.arithmetic, invalid.illegal.combinator.less | #AB5959 | — |
| source.ts, delimiter, meta.block, meta.brace, punctuation, meta.parameters, keyword.operator, meta.objectliteral, meta.array.literal, source.prisma.array, punctuation.accessor, meta.type.annotation, meta.feature-query.css, meta.function.calc.css, meta.property-list.css, source.prisma.embedded, meta.tag.block.any.html, meta.tag.inline.any.html, meta.attribute.directive, entity.name.tag.reference, storage.type.function.arrow, support.constant.handlebars, keyword.operator.assignment, punctuation.section.function, punctuation.separator.key-value, meta.at-rule.supports.header.css, punctuation.definition.parameters, meta.tag.structure.input.void.html, punctuation.definition.typeparameters, punctuation.definition.attribute-selector, source.css.less punctuation.definition.group, meta.embedded.block.github-actions-expression, invalid.illegal.character-not-allowed-here.html | #888888cf | — |
| markup.strikethrough | — | strikethrough |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.inserted, punctuation.definition.inserted | #377351 | — |
| markup.deleted, punctuation.definition.deleted | #a25f5b | — |
| markup.changed, punctuation.definition.changed | #3968a0 | — |
| markup.ignored, markup.untracked | #2f363d | — |
| meta.diff.range | #b392f0 | bold |
| meta.diff.header | #79b8ff | — |
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}!`;
}