This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
terminally-online/src/utilities/view.ts
2023-07-11 17:08:43 +03:00

32 lines
531 B
TypeScript

import { VIEW } from '../types';
const getViewIcon = (view: VIEW) => {
switch (view) {
case VIEW.MASONRY: {
return 'view-dashboard';
}
case VIEW.GRID: {
return 'view-grid';
}
case VIEW.LIST: {
return 'view-list';
}
}
};
const getNextView = (view: VIEW) => {
switch (view) {
case VIEW.MASONRY: {
return VIEW.GRID;
}
case VIEW.GRID: {
return VIEW.LIST;
}
case VIEW.LIST: {
return VIEW.MASONRY;
}
}
};
export { getViewIcon, getNextView };