( theme: Pick<CustomTheme, 'modes'>, mode: CustomThemeMode )
| 229 | |
| 230 | /** Whether a theme provides the given mode (single-mode themes pin their one). */ |
| 231 | export function customThemeSupportsMode( |
| 232 | theme: Pick<CustomTheme, 'modes'>, |
| 233 | mode: CustomThemeMode |
| 234 | ): boolean { |
| 235 | return theme.modes === 'both' || theme.modes === mode |
| 236 | } |
| 237 | |
| 238 | const asString = (v: unknown): string | undefined => |
| 239 | typeof v === 'string' && v.trim() ? v.trim() : undefined |
no outgoing calls
no test coverage detected