npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-modern-time-picker

v1.0.6

Published

<table align="right"> <tr> <td><img src="docs/ezgif.com-crop.gif" alt="React Native Modern Time Picker" height="500px" style="margin-right:10px" /></td> </tr> </table>

Downloads

243

Readme

REACT-NATIVE-MODERN-TIME-PICKER

🚧 We apologize for the inconvenience, but we are currently experiencing some installation issues with the library. We are working diligently to resolve this as soon as possible! 🛠️💪

The TimePicker component is a React Native component that allows selecting values for days, hours, and minutes.

Installation

To use the TimePicker component in your project, follow the steps below:

  1. Make sure you have Node.js and npm (or yarn) installed in your development environment.

  2. Open the terminal and navigate to the root directory of your project.

  3. Run the following command to install the component via npm:

npm install react-native-modern-time-picker

or if you're using yarn, run:

yarn add react-native-modern-time-picker
  1. Import the TimePicker component in your JavaScript/TypeScript file where you want to use it:
import TimePicker from 'react-native-modern-time-picker'

Now you're ready to start using the TimePicker component in your project!

Props

The TimePicker component accepts the following props:

  • minutesValue (required): Object containing the following properties:

    • totalValue (number): The total number of values available for minutes.
    • textValue (string): The text displayed next to each minute value.
    • initialValue (optional): The initial value for minutes.
  • hoursValue (required): Object containing the following properties:

    • totalValue (number): The total number of values available for hours.
    • textValue (string): The text displayed next to each hour value.
    • initialValue (optional): The initial value for hours.
  • daysValue (optional): Object containing the following properties:

    • totalValue (number): The total number of values available for days.
    • textValue (string): The text displayed next to each day value.
    • initialValue (optional): The initial value for days.
  • dividerStyle (optional): Style applied to the divider between the time values.

  • textValueStyle (optional): Style applied to the text displayed next to each time value.

  • valueSelectedStyle (optional): Style applied to the selected value.

  • valueUnselectedStyle (optional): Style applied to the unselected values.

  • style (optional): Additional style applied to the TimePicker component.

  • onValuesSelected (required): Function called when the time values are selected. Receives an object containing the days, hours, and minutes properties, representing the selected values for days, hours, and minutes respectively.

Example Usage

import React, {useState} from 'react';
import {
  StyleSheet,
  Text,
  View,
} from 'react-native';
import TimePicker from './src';

const App = () => {
  const [selectedValues, setSelectedValues] = useState({
    days: 0,
    hours: 0,
    minutes: 0,
  });

  const handleValuesSelected = (values: {
    days: number;
    hours: number;
    minutes: number;
  }) => {
    setSelectedValues(values);
  };

  return (
    <View style={styles.container}>
      <TimePicker
        minutesValue={{totalValue: 60, textValue: 'min'}}
        hoursValue={{totalValue: 24, textValue: 'hours'}}
        daysValue={{totalValue: 99, textValue: 'days', initialValue: 20}}
        style={{marginHorizontal: 10}}
        dividerStyle={{fontSize: 30, color: '#000'}}
        textValueStyle={{fontSize: 15, color: '#000'}}
        valueSelectedStyle={{fontSize: 32, marginVertical: -3, color: '#000', opacity: 1}}
        valueUnselectedStyle={{fontSize: 20, marginVertical: 0, color: '#000', opacity: 0.5}}
        onValuesSelected={handleValuesSelected}
      />
      <Text>
        Selected Values: {selectedValues.days} days, {selectedValues.hours} hours, {selectedValues.minutes} minutes
      </Text>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    alignItems: 'center',
    justifyContent: 'center',
    flex: 1,
  },
});

export default App;

Contributing

Contributions are welcome! Here are some ways you can contribute to this project:

  • Report bugs or suggest improvements by creating a new issue.
  • Fix bugs or implement new features by submitting a pull request.
  • Improve the documentation by suggesting changes or adding examples.
  • Help others by answering questions and providing support in the project's issue tracker.

To contribute to this project, follow these steps:

  1. Fork the repository.
  2. Create a new branch for your contribution.
  3. Make the necessary changes and commit them.
  4. Push your changes to your forked repository.
  5. Submit a pull request to the original repository.

Please ensure that your contributions adhere to the project's coding guidelines and follow best practices. Also, make sure to provide a clear description of your changes in the pull request.

Thank you for contributing to this project!

Connect with Me and Share

If you find this TimePicker component helpful, I would appreciate it if you could connect with me on LinkedIn and share your experience of using it.

LinkedIn