[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
608 B

5 years ago
  1. import { Action } from 'redux'
  2. import { ColorScheme } from '../types'
  3. export interface SetThemeAction extends Action {
  4. type: 'THEME_SET_THEME'
  5. payload: string
  6. }
  7. export interface SetColorSchemeAction extends Action {
  8. type: 'THEME_SET_COLOR_SCHEME'
  9. payload: ColorScheme
  10. }
  11. export type ThemeActions = SetThemeAction | SetColorSchemeAction
  12. export const setTheme = (name: string): SetThemeAction => ({
  13. type: 'THEME_SET_THEME',
  14. payload: name,
  15. })
  16. export const setColorScheme = (scheme: ColorScheme): SetColorSchemeAction => ({
  17. type: 'THEME_SET_COLOR_SCHEME',
  18. payload: scheme,
  19. })