import '@karrotframe/pulltorefresh/index.css' ; import React from 'react' ; import styled from '@emotion/styled' ; import { ScreenHelmet } from '@karrotframe/navigator' ; import { PullToRefresh } from '@karrotframe/pulltorefresh' ; const PagePullToRefresh = ( ) => { return ( < > < ScreenHelmet title = "@karrotframe/pulltorefresh" / > < PullToRefresh onPull = { async ( dispose ) => { await delay ( 1000 ) ; dispose ( ) ; } } > < ScrollEnabler /> < /PullToRefresh> < />); } ; function delay ( ms ) { return new Promise < void > ( ( resolve ) => { setTimeout ( resolve , ms ) ; } ) ; } const ScrollEnabler = styled . div `
  height: 200vh;
` ; export default PagePullToRefresh ;