mt-ad-space
A light-weight React mt-ad-space component with extremely easy API(只适用于移动端项目). Online Demo, welcome code review
Installation
npm install mt-ad-space --save
Usage
;;;;;;;;; const source = img1 img2 img3 ;const source_2 = img1 img2 img3 img4 img5 img6; { super; thisstate = indicator: 0 ; } { return <div className="container"> <div style= height: 200 ></div> <AdSpace width=320 spacing=10 onChange= { this } > source </AdSpace> <h1>thisstateindicator</h1> <AdSpace width=320 spacing=10 > source_2 </AdSpace> </div> ; }
props
param | detail | type | default |
---|---|---|---|
width | component width | number | isRequired |
spacing | spacing between each element | number | isRequired |
children | child node of component | array | [] |
onChange | callback function when channel changes | function | empty |