Skip to content

Instantly share code, notes, and snippets.

@mohsentaleb
Created March 6, 2022 07:34
Show Gist options
  • Save mohsentaleb/af11dc8e3bb637bd0cf5369a86d935d8 to your computer and use it in GitHub Desktop.
Save mohsentaleb/af11dc8e3bb637bd0cf5369a86d935d8 to your computer and use it in GitHub Desktop.
export const setBackground = (
background: string
): {
type: "SET_BACKGROUND_COLOR";
payload: {
background: string;
};
} => ({
type: "SET_BACKGROUND_COLOR",
payload: {
background
}
});
export const setContent = (
content: string
): {
type: "SET_CONTENT";
payload: {
content: string;
};
} => ({
type: "SET_CONTENT",
payload: {
content
}
});
export type Action =
| ReturnType<typeof setBackground>
| ReturnType<typeof setContent>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment