Skip to content

Commit 1b9d39f

Browse files
committed
Add babel polyfill for testing, update tests to have two cards, update browser support in readme
1 parent 2075dcb commit 1b9d39f

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ from [David Walsh's great tutorial](https://davidwalsh.name/css-flip).
1616
`npm install react-card-flipper --save`
1717

1818
## Current Browser Support
19-
Initial testing via BrowserStack:
19+
Initial testing via BrowserStack of a React app that simply renders the card
20+
component.
2021

2122
| Browser | Support | Notes |
22-
| ------------- |:--:| ------ |
23-
| Chrome >= 38 || |
24-
| Edge >= 14 || |
25-
| IE 11 | ⚠️ | |
26-
| IE 10 || Card flip appears backwards |
27-
| Safari >= 10.1|| |
28-
| Safari 9.1 | ⚠️ | React doesn't render, possibly needs a babel polyfill for testing |
23+
| ---------------- |:--:| ------ |
24+
| Chrome >= 38 || |
25+
| Edge >= 14 || |
26+
| Firefox >= 16 | ✅‍ | |
27+
| IE 11-10 | ⚠️ | Card flip back panel does not appear |
28+
| IE 9.0 || Both sides of card appear at once |
29+
| Opera >= 30 || |
30+
| Safari >= 6.2.8 || |
31+
| Safari 6.0.5 | ⚠️ | Card flip has no animation |
2932

3033

3134
## Getting Started

Test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ ReactDOM.render(
1414
Great job! You win person of the year.
1515
</div>
1616
</ReactCardFlipper>
17+
<ReactCardFlipper width="300px" height="400px" behavior="hover">
18+
<div className="text-center">
19+
This is a second card because you can have multiple. This one hovers!
20+
</div>
21+
<div className="text-center">
22+
Great job! You win person of the day.
23+
</div>
24+
</ReactCardFlipper>
1725
</div>
1826
</div>
1927
</div>,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"babel-cli": "^6.26.0",
1313
"babel-core": "^6.26.0",
1414
"babel-loader": "^7.1.4",
15+
"babel-polyfill": "^6.26.0",
1516
"babel-preset-env": "^1.6.1",
1617
"babel-preset-react": "^6.24.1",
1718
"css-loader": "^0.28.10",

tests/tests.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
}
44

55
.rcf-container {
6-
margin: 0 auto;
6+
display: inline-block;
7+
margin: 0 20px;
78
}
89

910
.rcf-front, .rcf-back{

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22

33
module.exports = {
4-
entry: './Test.js',
4+
entry: ['babel-polyfill', './Test.js'],
55
output: {
66
filename: 'test_bundle.js',
77
path: path.resolve(__dirname, 'tests')

0 commit comments

Comments
 (0)