You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`behavior`| String (`click` or `hover`) |`click`| If the card should click to flip, or hover to flip. |
70
+
|`levitate`|Boolean|`false`| If the card should "levitate" up on hover. Only applied when `behavior` is `click`. |
70
71
71
72
#### Example:
73
+
72
74
```js
73
75
render() {
74
76
return(
@@ -87,31 +89,49 @@ render() {
87
89
```
88
90
89
91
## Styling
92
+
90
93
Out of the box we provide very little styling aside from core styles like transitions
91
-
to let you shape the design as you see fit. All of the css classes provided for are
92
-
prefixed with `rcf-` to avoid any conflicts with existing classes. In most cases you'll
93
-
only be adding styles to `.rcf-front` & `.rcf-back`. All classes available for styling are:
94
+
to let you shape the design as you see fit. You can style your cards by passing className's as props.
95
+
To style the card itself, you want to use `innerCardClass`, for the card container itself you
96
+
would use a normal `className`. You can see a working example [here](https://codesandbox.io/s/p99p8mxqqj) or reference the following code snippet (this example is using `react-jss`):
94
97
95
-
-`rcf-container` - main container for the component
96
-
-`rcf-front` - front card styling
97
-
-`rcf-back` - back card styling
98
-
-`rcf-flipper` - "flipper" container, controls animation speed, etc.
98
+
```js
99
+
<ReactCardFlipper
100
+
width="300px"
101
+
height="400px"
102
+
behavior="click"
103
+
className={classes.root}
104
+
innerCardClass={classes.card}
105
+
>
106
+
<div className="text-center">You can click me, go ahead... Try it.</div>
107
+
<div className="text-center">Great job! You win person of the month.</div>
108
+
</ReactCardFlipper>
109
+
```
99
110
100
111
## Development
112
+
101
113
To get started developing on this project, fork or clone the repo. Then run `yarn install`
102
114
103
115
#### Start the development server
116
+
104
117
##### `yarn start`
118
+
105
119
Starts the development/test server and polls for changes.
106
120
107
121
#### Running EsLint
122
+
108
123
##### `yarn lint`
124
+
109
125
Lints `ReactCardFlipper.js` and outputs any warnings or errors.
0 commit comments