1.0.5 • Published 3 years ago

@trillionthoughts/react-react_native-runtimer v1.0.5

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

React / React Native - Runtimer

Package made with ts you can render (React or React native)jsx through render props.

Installation

Use the package manager npm or yarn to install.

npm i @trillionthoughts/react-react_native-runtimer

or

yarn add @trillionthoughts/react-react_native-runtimer

Usage

In React

...
import Timer from "@trillionthoughts/react-react_native-runtimer"

{...
 <Timer render={(timer) => <p>{timer}<p> }/>;
...};

In React Native

...
import Timer from "@trillionthoughts/react-react_native-runtimer"

{...
 <Timer render={(timer) => <Text>{timer}<Text> }/>;
...};

Props

Propsusagedefault
iniValuein sec or ms0
inputType"s" or "ms""s"
formatTime"hh:mm:ss" or "ss""hh:mm:ss"
render(timer:string)=> jsx.element<></>
autoStartbooleanfalse
startref.current.start()-
stopref.current.stop()-
toggleref.current.toggle()-
resetref.current.reset()-

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Github

Licence

MIT

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago