New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-flip-timer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-flip-timer

A Flip timer implementation in React Native

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by5.26%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-flip-timer Build Status CodeFactor Maintainability Test Coverage npm version npm downloads module formats: umd, cjs, esm

A Flip timer implementation in React Native

For Countdown Timer application you can checkout react-native-flip-countdown-timer repository.

Show Cases

IOSAndroid
IOSAndroid

Getting Started

Installation

$ npm i react-native-flip-timer --save

Basic Usage

import React, { Component } from 'react';
import {
  StyleSheet, View, TouchableOpacity, Text,
} from 'react-native';
import { Timer, FlipNumber } from 'react-native-flip-timer';

export default class App extends Component {
  state = {
    play: true,
  }

  play = () => {
    this.setState(({ play }) => ({ play: !play }));
  }

  render() {
    const { play } = this.state;
    return (
      <View style={styles.container}>
        <Timer time={500} play={play} />
        <TouchableOpacity style={styles.button} onPress={this.play}>
          <Text style={styles.text}>{play ? 'Pause' : 'Play'}</Text>
        </TouchableOpacity>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: 'white',
    alignItems: 'center',
    justifyContent: 'center',
  },
  button: {
    height: 40,
    backgroundColor: '#333333',
    width: 120,
    alignItems: 'center',
    justifyContent: 'center',
  },
  text: {
    fontSize: 16,
    fontWeight: 'bold',
    color: '#cccccc',
  },
});

Properties

Timer Props
PropDefaultTypeDescription
timerequiredstring / numberTime (in seconds)
playtrueboolPlay the timer
wrapperStyle{}objectWrapper for the Timer
flipNumberProps{...}defaultsFlip Number Props
Flip Number Props
PropDefaultTypeDescription
numberrequiredstring / numberNumber Input
unitsecondshours / minutes / secondsNumber Input Unit
sizenumberdeviceWidth / 6Size of the card
perspective250numberPerspective
numberWrapperStyle{}objectWrapper Style
cardStyle{}objectCard Style
flipCardStyle{}objectFlip Card Style
numberStyle{}objectNumber Style

Todos

  • Full Coverage Tests for the Components
  • Support for Labels

Contribution

Questions

Feel free to contact me or create an issue

Keywords

FAQs

Package last updated on 04 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc