1.0.3 • Published 7 years ago

preact-swipe-container v1.0.3

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

preact-scroll-container

The component of preact

use

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

	ul{
		width: 300%;
		overflow: hidden;

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

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago