MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / createTheme

Function createTheme

packages/app-core/src/components/SettingsModal.tsx:818–832  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

816 }
817
818 const createTheme = async (): Promise<void> => {
819 const name = await promptApp({
820 title: 'New theme',
821 description: 'Creates a folder with a manifest.json and theme.css you can edit.',
822 placeholder: 'My Theme',
823 initialValue: 'My Theme',
824 okLabel: 'Create'
825 })
826 if (name === null) return
827 const slug = await window.zen.createCustomTheme?.({ name: name.trim() || 'My Theme' })
828 if (slug) {
829 refreshCustomThemes()
830 void window.zen.revealCustomThemesDir?.(slug)
831 }
832 }
833
834 // Keep the swatches showing the *active theme's* colors: re-read each token
835 // whenever the applied theme changes (data-theme / data-theme-mode flip on

Callers 1

SettingsModalFunction · 0.85

Calls 4

promptAppFunction · 0.90
refreshCustomThemesFunction · 0.90
createCustomThemeMethod · 0.80
revealCustomThemesDirMethod · 0.80

Tested by

no test coverage detected