0.5.1 • Published 6 years ago

react-stretchable-button v0.5.1

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

react-stretchable-button

Build Status NpmVersion npm GitHub

A simple React button component that can be stretched to display something on mouse over.

Demo

Demo is available with source code.

Installation

npm install react-stretchable-button --save

API

PropertyDescriptionDefault valuetype
heightHeight of button50number
widthWidth of button before and after strech50,100array
styleStyle of root divnullobject
buttonStyleStyle of button divnullobject
squareShould button shape be squarefalseboolean
alignRightShould button stretch to leftfalseboolean
stretchPaddingPadding of stretched button25number
zDepthSet zDepth of button, whose range is 0,52number
transitionDurationDuration time of button stretching (ms)250number
emergeDelayDelay time of component emerging100number
onMouseEnterWill be invoked each time mouse enters buttonnullfunction
onMouseLeaveWill be invoked each time mouse leaves buttonnullfunction
componentDisplayedComponent displayed before button is stretchednullnode
componentToDisplayComponent to display after button is stretchednullnode

Development Setup

  • Clone the repo: git clone https://github.com/zianke/react-stretchable-button.git
  • Install the dependencies: cd react-stretchable-button && npm install
  • Start webpack: npm start
  • Modify example/index.js and open example/index.html
0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago