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.
19 lines
640 B
19 lines
640 B
3 years ago
|
import {BaseAction} from "./BaseAction";
|
||
|
import {AppAction} from "./AppAction";
|
||
|
|
||
|
export const USER_ACTIVE_COLOR = "USER_ACTIVE_COLOR"
|
||
|
export interface UserActiveColorAction extends BaseAction {
|
||
|
readonly type: typeof USER_ACTIVE_COLOR
|
||
|
/** The hex color that the user will begin painting with. */
|
||
|
readonly color: string
|
||
|
}
|
||
|
export function isUserActiveColorAction(action: AppAction): action is UserActiveColorAction {
|
||
|
return action.type === USER_ACTIVE_COLOR
|
||
|
}
|
||
|
|
||
|
export function isUserAction(action: AppAction): action is UserAction {
|
||
|
return isUserActiveColorAction(action)
|
||
|
}
|
||
|
|
||
|
export type UserAction = UserActiveColorAction;
|