1.0.1 • Published 7 years ago

preact-scroll-container v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

preact-scroll-container

The component of preact

use

import ScrollContainer from 'preact-scroll-container';
...
 <ScrollContainer calss="container" currentPage="0" totalPage="4" soft={true} onChange={(num)=>{console.log(num)}}>
    <ul>
        <li>...</li>
        <li>...</li>
        <li>...</li>
        <li>...</li>
    </ul>
 </ScrollContainer>
 ...
.container{
	width: 100vw;
	height: 100px;
	overflow: hidden;

	ul{
		width: 300%;
		overflow: hidden;

		li{
			float: left;
			width: 100vw;
			height: 100px;
		}
	}
}
1.0.1

7 years ago

1.0.0

7 years ago