74186950b2
* Invert primary scale * Invert negative palette * Replace theme specific styles in Toggle * Remove theme specific colors from Button, improves secondary solid on dark mode * TextField * Remove from MessageItem * Threadgate editor * IconCircle * Muted words * Generate themes from hues * Cleanup * Deprecate more values, fix circular import * Invert positive too, hardly use * Button tweaks, some theme diffs * Match disabled state for negative button * Fix unread noty bg
15 lines
391 B
TypeScript
15 lines
391 B
TypeScript
import {ThemeName} from '#/alf/types'
|
|
|
|
export function select<T>(name: ThemeName, options: Record<ThemeName, T>) {
|
|
switch (name) {
|
|
case 'light':
|
|
return options.light
|
|
case 'dark':
|
|
return options.dark || options.dim
|
|
case 'dim':
|
|
return options.dim || options.dark
|
|
default:
|
|
throw new Error(`select(theme, options) received unknown theme ${name}`)
|
|
}
|
|
}
|