( baseTheme: Theme, name: string, id?: string )
| 22 | } |
| 23 | |
| 24 | export 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 | |
| 43 | export function duplicateTheme( |
| 44 | theme: Theme, |
no test coverage detected