mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 16:30:57 +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