An ATproto social media client -- with an independent Appview.
at main 14 lines 396 B view raw
1import {type ThemeName} from '#/alf/types' 2 3export function select<T>(name: ThemeName, options: Record<ThemeName, T>) { 4 switch (name) { 5 case 'light': 6 return options.light 7 case 'dark': 8 return options.dark || options.dim 9 case 'dim': 10 return options.dim || options.dark 11 default: 12 throw new Error(`select(theme, options) received unknown theme ${name}`) 13 } 14}