@atlaskit/page-layout
Version:
A collection of components which let you compose an application's page layout.
8 lines • 399 B
JavaScript
import { getGridStateFromStorage } from './get-grid-state-from-storage';
export const resolveDimension = (key, dimension = 0, shouldPersist = false) => {
if (shouldPersist) {
const cachedGridState = getGridStateFromStorage('gridState');
return cachedGridState && Object.keys(cachedGridState).length > 0 && cachedGridState[key] ? cachedGridState[key] : dimension;
}
return dimension;
};