Skip to content

Commit 310b889

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/adobe/css-tools-4.3.2
2 parents df6be4f + 6fe0165 commit 310b889

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

lib/ReactCardFlip.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ var ReactCardFlip = function (props) {
6767
var frontRotateX = "rotateX(".concat(infinite ? rotation : isFlipped ? 180 : 0, "deg)");
6868
var backRotateX = "rotateX(".concat(infinite ? rotation + 180 : isFlipped ? 0 : -180, "deg)");
6969
var styles = {
70-
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),
70+
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),
7171
container: {
72-
perspective: '1000px',
7372
zIndex: "".concat(cardZIndex),
7473
},
7574
flipper: {
7675
height: '100%',
76+
perspective: '1000px',
7777
position: 'relative',
7878
width: '100%',
7979
},

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-card-flip",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "ReactCardFlip",
55
"main": "./lib/ReactCardFlip.js",
66
"types": "./lib/ReactCardFlip.d.ts",

src/ReactCardFlip.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
1717
flipSpeedBackToFront,
1818
infinite,
1919
isFlipped,
20-
} = {
20+
} = {
2121
cardStyles: {
2222
back: {},
2323
front: {},
@@ -31,7 +31,7 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
3131
isFlipped: false,
3232
...props
3333
}
34-
34+
3535
const [isFlippedState, setFlipped] = useState(isFlipped);
3636
const [rotation, setRotation] = useState(0);
3737

@@ -84,14 +84,15 @@ const ReactCardFlip: React.FC<ReactFlipCardProps> = (props) => {
8484
transformStyle: 'preserve-3d',
8585
transition: `${flipSpeedFrontToBack}s`,
8686
width: '100%',
87+
zIndex: isFlipped ? '2' : '1',
8788
...back,
8889
},
8990
container: {
90-
perspective: '1000px',
9191
zIndex: `${cardZIndex}`,
9292
},
9393
flipper: {
9494
height: '100%',
95+
perspective: '1000px',
9596
position: 'relative',
9697
width: '100%',
9798
},

0 commit comments

Comments
 (0)