Skip to content

Commit

Permalink
make videoItem use esm import (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
liatv committed Mar 12, 2024
1 parent e73f35c commit 9df09b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/gallery/src/components/item/videos/getStyle.js
@@ -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 Down
4 changes: 2 additions & 2 deletions packages/gallery/src/components/item/videos/videoItem.js
@@ -1,7 +1,7 @@
import React from 'react';
import { GALLERY_CONSTS, window, utils } 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 @@ -166,7 +166,7 @@ class VideoItem extends React.Component {

const attributes = {
controlsList: 'nodownload',
disablePictureInPicture: 'true',
disablePictureInPicture: true,
muted: !this.props.options.videoSound,
preload: 'metadata',
style: getStyle(isCrop, isWiderThenContainer),
Expand Down

0 comments on commit 9df09b4

Please sign in to comment.