react-card-flip
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -90,7 +90,2 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ReactCardFlip = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
_react2['default'].createElement( | ||
'p', | ||
null, | ||
'Click the button to flip the card!' | ||
), | ||
_react2['default'].createElement( | ||
'div', | ||
@@ -97,0 +92,0 @@ { |
@@ -1,1 +0,1 @@ | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.ReactCardFlip=e()}}(function(){return function e(t,r,n){function o(l,f){if(!r[l]){if(!t[l]){var a="function"==typeof require&&require;if(!f&&a)return a(l,!0);if(i)return i(l,!0);var p=new Error("Cannot find module '"+l+"'");throw p.code="MODULE_NOT_FOUND",p}var u=r[l]={exports:{}};t[l][0].call(u.exports,function(e){var r=t[l][1][e];return o(r?r:e)},u,u.exports,e,t,r,n)}return r[l].exports}for(var i="function"==typeof require&&require,l=0;l<n.length;l++)o(n[l]);return o}({1:[function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),f=function(e,t,r){for(var n=!0;n;){var o=e,i=t,l=r;n=!1,null===o&&(o=Function.prototype);var f=Object.getOwnPropertyDescriptor(o,i);if(void 0!==f){if("value"in f)return f.value;var a=f.get;if(void 0===a)return;return a.call(l)}var p=Object.getPrototypeOf(o);if(null===p)return;e=p,t=i,r=l,n=!0,f=p=void 0}},a="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,p=n(a),u=function(e){function t(e){o(this,t),f(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isFlipped:this.props.isFlipped}}return i(t,e),l(t,[{key:"componentWillReceiveProps",value:function(e){e.isFlipped!==this.props.isFlipped&&this.setState({isFlipped:e.isFlipped})}},{key:"getComponent",value:function(e){return this.props.children.filter(function(t){return t.key===e})}},{key:"render",value:function(){var e={container:{perspective:"1000px"},flipper:{position:"relative",transformStyle:"preserve-3d",transition:"0.6s"},flipperFlip:{position:"relative",transform:"rotateY(180deg)",transformStyle:"preserve-3d",transition:"0.6s"},front:{backfaceVisibility:"hidden",left:"0",position:"absolute",top:"0",transform:"rotateY(0deg)",width:"100%",zIndex:"2"},back:{backfaceVisibility:"hidden",left:"0",position:"absolute",transform:"rotateY(180deg)",top:"0",width:"100%"}};return p["default"].createElement("div",{className:"react-card-flip",style:e.container},p["default"].createElement("p",null,"Click the button to flip the card!"),p["default"].createElement("div",{className:"react-card-flipper",style:this.state.isFlipped?e.flipperFlip:e.flipper},p["default"].createElement("div",{className:"react-card-front",style:e.front},this.getComponent("front")),p["default"].createElement("div",{className:"react-card-back",style:e.back},this.getComponent("back"))))}}]),t}(p["default"].Component);u.propTypes={children:function(e,t,r){if(2!==p["default"].Children.count(e[t]))return new Error(r+" requires two children.")},isFlipped:p["default"].PropTypes.bool},r["default"]=u,t.exports=r["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.ReactCardFlip=e()}}(function(){return function e(t,r,n){function o(f,l){if(!r[f]){if(!t[f]){var a="function"==typeof require&&require;if(!l&&a)return a(f,!0);if(i)return i(f,!0);var p=new Error("Cannot find module '"+f+"'");throw p.code="MODULE_NOT_FOUND",p}var u=r[f]={exports:{}};t[f][0].call(u.exports,function(e){var r=t[f][1][e];return o(r?r:e)},u,u.exports,e,t,r,n)}return r[f].exports}for(var i="function"==typeof require&&require,f=0;f<n.length;f++)o(n[f]);return o}({1:[function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var f=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=function(e,t,r){for(var n=!0;n;){var o=e,i=t,f=r;n=!1,null===o&&(o=Function.prototype);var l=Object.getOwnPropertyDescriptor(o,i);if(void 0!==l){if("value"in l)return l.value;var a=l.get;if(void 0===a)return;return a.call(f)}var p=Object.getPrototypeOf(o);if(null===p)return;e=p,t=i,r=f,n=!0,l=p=void 0}},a="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,p=n(a),u=function(e){function t(e){o(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={isFlipped:this.props.isFlipped}}return i(t,e),f(t,[{key:"componentWillReceiveProps",value:function(e){e.isFlipped!==this.props.isFlipped&&this.setState({isFlipped:e.isFlipped})}},{key:"getComponent",value:function(e){return this.props.children.filter(function(t){return t.key===e})}},{key:"render",value:function(){var e={container:{perspective:"1000px"},flipper:{position:"relative",transformStyle:"preserve-3d",transition:"0.6s"},flipperFlip:{position:"relative",transform:"rotateY(180deg)",transformStyle:"preserve-3d",transition:"0.6s"},front:{backfaceVisibility:"hidden",left:"0",position:"absolute",top:"0",transform:"rotateY(0deg)",width:"100%",zIndex:"2"},back:{backfaceVisibility:"hidden",left:"0",position:"absolute",transform:"rotateY(180deg)",top:"0",width:"100%"}};return p["default"].createElement("div",{className:"react-card-flip",style:e.container},p["default"].createElement("div",{className:"react-card-flipper",style:this.state.isFlipped?e.flipperFlip:e.flipper},p["default"].createElement("div",{className:"react-card-front",style:e.front},this.getComponent("front")),p["default"].createElement("div",{className:"react-card-back",style:e.back},this.getComponent("back"))))}}]),t}(p["default"].Component);u.propTypes={children:function(e,t,r){if(2!==p["default"].Children.count(e[t]))return new Error(r+" requires two children.")},isFlipped:p["default"].PropTypes.bool},r["default"]=u,t.exports=r["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); |
@@ -38,2 +38,6 @@ import React from 'react'; | ||
<div style={styles.example}> | ||
<p> | ||
Click the button to flip the card! | ||
</p> | ||
<ReactCardFlip isFlipped={this.state.isFlipped}> | ||
@@ -40,0 +44,0 @@ <div key="front" style={styles.card}> |
@@ -88,7 +88,2 @@ 'use strict'; | ||
_react2['default'].createElement( | ||
'p', | ||
null, | ||
'Click the button to flip the card!' | ||
), | ||
_react2['default'].createElement( | ||
'div', | ||
@@ -95,0 +90,0 @@ { |
{ | ||
"name": "react-card-flip", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "ReactCardFlip", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactCardFlip.js", |
@@ -60,6 +60,2 @@ import React from 'react'; | ||
<div className="react-card-flip" style={styles.container}> | ||
<p> | ||
Click the button to flip the card! | ||
</p> | ||
<div | ||
@@ -66,0 +62,0 @@ className="react-card-flipper" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26976
425