Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement logic to set the unit color from a ColorPicker
- Loading branch information
1 parent
2bfcd6e
commit c0baa2f
Showing
4 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,8 +1,18 @@ | |||
import {UNIT_INFO_UPDATE} from "./unitInfoConstants"; | import { | ||
UNIT_INFO_UPDATE, | |||
UNIT_INFO_SET_COLOR, | |||
} from "./unitInfoConstants"; | |||
|
|
||
export function updateUnitInfo(values) { | export function updateUnitInfo(values) { | ||
return { | return { | ||
type : UNIT_INFO_UPDATE, | type : UNIT_INFO_UPDATE, | ||
payload : values, | payload : values, | ||
}; | }; | ||
} | |||
|
|||
export function setUnitColor(color) { | |||
return { | |||
type : UNIT_INFO_SET_COLOR, | |||
payload : {color} | |||
}; | |||
} | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1,2 @@ | |||
export const UNIT_INFO_UPDATE = "UNIT_INFO_UPDATE"; | export const UNIT_INFO_UPDATE = "UNIT_INFO_UPDATE"; | ||
export const UNIT_INFO_SET_COLOR = "UNIT_INFO_SET_COLOR"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters