mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-28 17:28:11 +08:00
Add responsive reducer
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const Responsive = (state = {
|
||||
width: null,
|
||||
height: null,
|
||||
}, action) => {
|
||||
switch (action.type) {
|
||||
case "resize event":
|
||||
return Object.assign({}, state, {
|
||||
width: action.data,
|
||||
height: action.data
|
||||
});
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default Responsive;
|
||||
Reference in New Issue
Block a user