diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-03-14 12:20:15 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-03-14 12:20:15 -0400 |
| commit | 7c760dd4d1e27180222d3d524949216e5b65194a (patch) | |
| tree | b8848242d1941a73c18ce68659cb2402150a8f24 /frontend/components/ChaChing.js | |
| parent | 331da87bd53bc1fb79063d142764c75df9f32170 (diff) | |
remove cha ching component
Diffstat (limited to 'frontend/components/ChaChing.js')
| -rw-r--r-- | frontend/components/ChaChing.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/frontend/components/ChaChing.js b/frontend/components/ChaChing.js deleted file mode 100644 index 5874c27..0000000 --- a/frontend/components/ChaChing.js +++ /dev/null @@ -1,56 +0,0 @@ -import TransitionGroup from 'react-transition-group/TransitionGroup'; -import Transition from 'react-transition-group/Transition'; -import styled from 'styled-components'; - -const CartCount = styled.div` - padding: 10px; - transition: all 0.5s; - display: inline-block; - background: white; - background: linear-gradient(to bottom, #eeeeee 0%, #eeeeee 100%); - transform: translateY(100%); - z-index: 1; - position: relative; - &.cart-entering { - background: green; - transform: translateY(100%); - } - &.cart-entered { - transform: translateY(0); - } - &.cart-exiting { - position: absolute; - z-index: 0; - left: 0; - transform: translateY(-100%); - } -`; - -const ChaChingStyles = styled.div` - position: relative; - display: inline-block; - overflow: hidden; -`; - -const ChaChing = ({ amount }) => ( - <ChaChingStyles> - <TransitionGroup> - <Transition - in - timeout={{ - enter: 0, - exit: 500, - }} - key={amount} - > - {status => ( - <CartCount className={`cart-${status}`} key={`count-${amount}`}> - {amount} - </CartCount> - )} - </Transition> - </TransitionGroup> - </ChaChingStyles> -); - -export default ChaChing; |
