Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/adobe/css-tools-4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCCWong authored May 31, 2024
2 parents df6be4f + 6fe0165 commit 310b889
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/ReactCardFlip.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ var ReactCardFlip = function (props) {
var frontRotateX = "rotateX(".concat(infinite ? rotation : isFlipped ? 180 : 0, "deg)");
var backRotateX = "rotateX(".concat(infinite ? rotation + 180 : isFlipped ? 0 : -180, "deg)");
var styles = {
back: __assign({ WebkitBackfaceVisibility: 'hidden', backfaceVisibility: 'hidden', height: '100%', left: '0', position: isFlipped ? 'relative' : 'absolute', top: '0', transform: flipDirection === 'horizontal' ? backRotateY : backRotateX, transformStyle: 'preserve-3d', transition: "".concat(flipSpeedFrontToBack, "s"), width: '100%' }, back),
back: __assign({ WebkitBackfaceVisibility: 'hidden', backfaceVisibility: 'hidden', height: '100%', left: '0', position: isFlipped ? 'relative' : 'absolute', top: '0', transform: flipDirection === 'horizontal' ? backRotateY : backRotateX, transformStyle: 'preserve-3d', transition: "".concat(flipSpeedFrontToBack, "s"), width: '100%', zIndex: isFlipped ? '2' : '1' }, back),
container: {
perspective: '1000px',
zIndex: "".concat(cardZIndex),
},
flipper: {
height: '100%',
perspective: '1000px',
position: 'relative',
width: '100%',
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-card-flip",
"version": "1.2.2",
"version": "1.2.3",
"description": "ReactCardFlip",
"main": "./lib/ReactCardFlip.js",
"types": "./lib/ReactCardFlip.d.ts",
Expand Down
7 changes: 4 additions & 3 deletions src/ReactCardFlip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
flipSpeedBackToFront,
infinite,
isFlipped,
} = {
} = {
cardStyles: {
back: {},
front: {},
Expand All @@ -31,7 +31,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
isFlipped: false,
...props
}

const [isFlippedState, setFlipped] = useState(isFlipped);
const [rotation, setRotation] = useState(0);

Expand Down Expand Up @@ -84,14 +84,15 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
transformStyle: 'preserve-3d',
transition: `${flipSpeedFrontToBack}s`,
width: '100%',
zIndex: isFlipped ? '2' : '1',
...back,
},
container: {
perspective: '1000px',
zIndex: `${cardZIndex}`,
},
flipper: {
height: '100%',
perspective: '1000px',
position: 'relative',
width: '100%',
},
Expand Down

0 comments on commit 310b889

Please sign in to comment.