MCPcopy Create free account
hub / github.com/TabularisDB/tabularis / createCustomTheme

Function createCustomTheme

src/utils/themeManagement.ts:24–41  ·  view source on GitHub ↗
(
  baseTheme: Theme,
  name: string,
  id?: string
)

Source from the content-addressed store, hash-verified

22}
23
24export function createCustomTheme(
25 baseTheme: Theme,
26 name: string,
27 id?: string
28): Theme {
29 const newId = id || generateCustomThemeId();
30 const now = new Date().toISOString();
31
32 return {
33 ...baseTheme,
34 id: newId,
35 name,
36 isPreset: false,
37 isReadOnly: false,
38 createdAt: now,
39 updatedAt: now,
40 };
41}
42
43export function duplicateTheme(
44 theme: Theme,

Callers 1

Calls 1

generateCustomThemeIdFunction · 0.85

Tested by

no test coverage detected