MCPcopy Create free account
hub / github.com/JacobLinCool/LeetCode-Stats-Card / Theme

Function Theme

packages/core/src/theme/_theme.ts:13–32  ·  view source on GitHub ↗
(theme: Partial<Theme>)

Source from the content-addressed store, hash-verified

11}
12
13export function Theme(theme: Partial<Theme>): Theme {
14 const completed: Theme = {
15 palette: {
16 bg: theme.palette?.bg ?? ["#fff", "#e5e5e5"],
17 text: theme.palette?.text ?? ["#000", "#808080"],
18 color: theme.palette?.color ?? [],
19 },
20 css: theme.css ?? "",
21 extends: theme.extends ?? undefined,
22 };
23
24 while (completed.palette.bg && completed.palette.bg.length < 4) {
25 completed.palette.bg.push(completed.palette.bg[completed.palette.bg.length - 1]);
26 }
27 while (completed.palette.text && completed.palette.text.length < 4) {
28 completed.palette.text.push(completed.palette.text[completed.palette.text.length - 1]);
29 }
30
31 return completed;
32}

Callers 11

transparent.tsFile · 0.90
nord.tsFile · 0.90
unicorn.tsFile · 0.90
forest.tsFile · 0.90
chartreuse.tsFile · 0.90
light.tsFile · 0.90
radical.tsFile · 0.90
wtf.tsFile · 0.90
dark.tsFile · 0.90
themeFromColorsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected