Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- import FlipCard from 'react-flipcard';
- import { Flex, Box, Grid } from 'reflexbox'
- export default class Flip extends Component {
- constructor(props) {
- super(props)
- this.state = {
- isFlipped: false,
- }
- }
- showBack() {
- this.setState({
- isFlipped: true,
- });
- }
- showFront() {
- this.setState({
- isFlipped: false,
- });
- }
- render() {
- const { children } = this.props
- return (
- <FlipCard
- disabled={false}
- flipped={this.state.isFlipped}
- >
- { children }
- </FlipCard>
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement