Skip to content

Commit

Permalink
make videoItem use esm import V5
Browse files Browse the repository at this point in the history
  • Loading branch information
liatv committed Mar 12, 2024
1 parent e417530 commit 723b34c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/gallery/src/components/item/videos/getStyle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module.exports = getStyle;

function getStyle(isCrop, isWiderThenContainer) {
export function getStyle(isCrop, isWiderThenContainer) {
const CALC = 'calc(100% + 1px)';
return isCrop ? getCrop() : getNonCrop();

Expand All @@ -26,3 +24,5 @@ function getStyle(isCrop, isWiderThenContainer) {
};
}
}

export default getStyle;
4 changes: 2 additions & 2 deletions packages/gallery/src/components/item/videos/videoItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { GALLERY_CONSTS, window, utils, optionsMap } from 'pro-gallery-lib';
import { shouldCreateVideoPlaceholder } from '../itemHelper';
import getStyle from './getStyle';
import { getStyle } from './getStyle';

class VideoItem extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -140,7 +140,7 @@ class VideoItem extends React.Component {

const attributes = {
controlsList: 'nodownload',
disablePictureInPicture: 'true',
disablePictureInPicture: true,
muted: !this.props.options[optionsMap.behaviourParams.item.video.volume],
preload: 'metadata',
style: getStyle(isCrop, isWiderThenContainer),
Expand Down

0 comments on commit 723b34c

Please sign in to comment.