3.0.0 • Published 9 years ago

apeman-react-reversible v3.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

apeman-react-reversible

Build Status Code Climate Code Coverage npm Version JS Standard

apeman component with reversible effect.

Installation

$ npm install apeman-react-reversible --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

Usage

'use strict'

import React from 'react';
import {ApReversible, ApReversibleStyle} from 'apeman-react-reversible';

const ExampleComponent = React.createClass({
  render () {
    const reversibleStyle = {
      position: `relative`,
      borderRadius: `28px`,
      overflow: `hidden`,
      margin: `0 8px`,
      border: `1px solid`
    }
    return (
      <div>
        <ApReversibleStyle />
        <div style={{fontSize:48}}>
          {
            [ 0, 0.25, 0.5, 0.75, 1 ].map((rate, i) => (
              <ApReversible rate={rate}
                            inline={true}
                            key={`reversible-${i}`}
                            backgroundColor="#FFF"
                            style={reversibleStyle}
                            color={'#F83'}
              >
                <span className="demo-badge">{parseInt(rate * 100)}<span>%</span></span>
              </ApReversible>
            ))
          }
          <br/>
        </div>
      </div>
    )
  }
})

Components

ApReversibleStyle

Props

NameTypeDefaultDescription
styleobject{}

ApReversible

Props

NameTypeDefaultDescription
ratenumber0
inlineboolfalse
backgroundColorstring'#FFF'
colorstring'#38E'
directionenum'VERTICAL'

License

This software is released under the MIT License.

Links

3.0.0

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago