Skip to content

Commit

Permalink
move thumbnails logic to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
IzaacAyelin committed May 28, 2024
1 parent 6b1e53c commit 222c12f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { GALLERY_CONSTS, utils } from 'pro-gallery-lib';

import TextItem from '../../item/textItem.js';

import {
getThumbnailsData,
clearGalleryItems,
} from '../../helpers/thumbnailsLogic';
import { getThumbnailsData, clearGalleryItems } from 'pro-gallery-lib';

const ENTER_KEY = 'Enter';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,13 @@ function getThumbnailLocation({
[isRTL ? 'bottom' : 'top']: offsetSize,
};
}
export default {
getThumbnailsData,
getThumbnailsContainerSize,
getNumberOfThumbnails,
getThumbnailsStyles,
getThumbnailsContainerMargin,
getThumbnailLocation,
calculateActiveIndexOffset,
clearGalleryItems,
};
1 change: 1 addition & 0 deletions packages/lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ export { GalleryProps, GalleryState } from './common/interfaces/galleryTypes';
export { Options } from './common/interfaces/options';
export { GalleryRendererProps } from './common/interfaces/galleryRendererTypes';
export { VirtualizationSettings } from './common/interfaces/virtualization';
export { default as thumbnailsLogic } from './core/helpers/thumbnailsLogic';

0 comments on commit 222c12f

Please sign in to comment.