Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bentatum committed May 7, 2017
2 parents a70610f + cfa4b92 commit a2b649e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Wave/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { animate, animationName, defaults, preside } from '../util'

const defaultSize = 22

const Wave = ({ color, columns, columnWidth, gutterWidth, scaleYEnd, scaleYStart, size, ...props }, { betterReactSpinkit = {} }) => {
const Wave = ({ color, columns, columnWidth, gutterWidth, reverse, scaleYEnd, scaleYStart, size, ...props }, { betterReactSpinkit = {} }) => {
const name = animationName('wave')
const finalSize = preside(size, betterReactSpinkit.size, defaultSize)
const outer = {
Expand All @@ -22,6 +22,7 @@ const Wave = ({ color, columns, columnWidth, gutterWidth, scaleYEnd, scaleYStart
height: '100%',
width: columnWidth
}
const cols = (reverse) ? range(columns).reverse() : range(columns)
return (
<Base
css={`
Expand All @@ -47,7 +48,7 @@ const Wave = ({ color, columns, columnWidth, gutterWidth, scaleYEnd, scaleYStart
{...props}
>
<div style={outer}>
{range(columns).map((index) =>
{cols.map((index) =>
<div
key={index}
style={{
Expand Down Expand Up @@ -79,6 +80,10 @@ Wave.propTypes = {
* The pixel value between columns.
*/
gutterWidth: PropTypes.number,
/**
* Reverse the animation.
*/
reverse: PropTypes.bool,
/**
* Ending column height.
*/
Expand All @@ -97,6 +102,7 @@ Wave.defaultProps = {
columns: 5,
columnWidth: '20%',
gutterWidth: 1,
reverse: false,
scaleYEnd: 1,
scaleYStart: 0.4,
size: defaultSize
Expand Down

0 comments on commit a2b649e

Please sign in to comment.