1.0.0 • Published 6 years ago
lucky-card v1.0.0
lucky-card
a react component using canvas of lucky-card
快速使用
npm install lucky-card
how to use it
import LuckyCard from 'lucky-card';
class Demo extends React.Component{
callback=()=>{}
render(){
return(
<LuckyCard callback={this.callback}/>
)
}
}
props
props name | description | example value |
---|---|---|
cWidth | the canvas width | 200(Number) |
cHeight | the canvas height | 200(Number) |
src | The radius of a small circle drawn by a mouse | 5(Number) |
coverImg | the img that draw on canvas | |
coverColor | the color of cover | "#000" |
ratio | Scale off the canvas | 0.8(Number) |