Skip to content

Commit

Permalink
Rename responsive factory
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Aug 6, 2019
1 parent 642871d commit a28c8c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions indico/web/client/js/react/util/Responsive.jsx
Expand Up @@ -20,7 +20,7 @@ const ORIENTATIONS = {
portrait: 'portrait',
};

const factory = (minDimension, maxDimension) => {
const dimensionFactory = (minDimension, maxDimension) => {
/**
* This component extends `Responsive` from `react-responsive`, adding some
* useful dimension configuration options.
Expand Down Expand Up @@ -89,10 +89,10 @@ const orientationFactory = orientation => {
};

export default Object.assign(Responsive, {
WideScreen: factory(DIMENSIONS.wideScreen, null),
Desktop: factory(DIMENSIONS.computer, DIMENSIONS.wideScreen),
Tablet: factory(DIMENSIONS.tablet, DIMENSIONS.computer),
Phone: factory(null, DIMENSIONS.tablet),
WideScreen: dimensionFactory(DIMENSIONS.wideScreen, null),
Desktop: dimensionFactory(DIMENSIONS.computer, DIMENSIONS.wideScreen),
Tablet: dimensionFactory(DIMENSIONS.tablet, DIMENSIONS.computer),
Phone: dimensionFactory(null, DIMENSIONS.tablet),
Portrait: orientationFactory(ORIENTATIONS.portrait),
Landscape: orientationFactory(ORIENTATIONS.landscape),
});
Expand Down

0 comments on commit a28c8c1

Please sign in to comment.