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

rn-simple-schedule

v1.0.1

Published

This is a simple schedule Reac-Native component

Downloads

2

Readme

Schedule React-Native component.


This is a simple week schedule component in React-Native. You can add appointments with their title, subtitle, day of week, start time, end time and color.

Screenshot

Install

It's very easy to install it. Run this commmand in your terminal :

npm install rn-simple-schedule

Exemple

import React from 'react';
import Schedule from 'rn-simple-schedule';

const data = [
    {
      Title: 'Meeting with John',
      Subtitle: 'About the new project',
      DayIndex: 1, //Monday
      StartTime: '08:30',
      EndTime: '09:30',
      Color: "#56b7fc"
    },
    {
      Title: 'Stay at home',
      Subtitle: 'Stay cool',
      DayIndex: 6, //Saturday
      StartTime: '08:30',
      EndTime: '18:30',
      Color: "#00ff67"
    }
  ];

export default function App() {
  return (
    <Schedule 
      lang='en'
      data={data} 
      rowSize={100}
      minHour={8}
      minMinute={30}
      numberOfRows={10}
      canRemove={false}
      darkMode={false}
      onAppointmentRemoved={(app)=>console.log(app)}
      onSelectedDayChanged={(dayIndex)=>console.log(dayIndex)}
    />
  );
}

Features

  • Customizable appointments colors
  • Adjuste size of an hour
  • Set the first hour to show
  • Choose the number of hours (rows) to show
  • Choose the language (english or french)
  • Popup to remove appointment (disablable)
  • Dark mode style (is auto managed by React-Native 0.63)

Props

None of the props are required !

|Prop|Description|Default value|Type| |--|--|--|--| | data | Array of appointments objects | Empty Array | Array | | rowSize | Height of an hour cell | 100 | number | | minHour | First hour to show | 8 | number | | minMinute | Minutes of the first hour to show | 30 | number | | numberOfRows | Number of hours (rows) to show | 13 | number | | canRemove | If true, a popup to remove the selected appointment , will appear, on press on it. | true | boolean | | darkMode | Enable dark mode style (is auto managed by React-Native 0.63 or higher) | Depending on device setting | boolean | | lang | Language used by the component | en (english) | string | | onAppointmentRemoved | Return a function triggered whenever user remove an appointement. | null | function | | onSelectedDayChanged | Return a function triggered whenever selected day changed. | null | function |

Data array of appointments objects

The data prop is an Array that must contains appointments objects with following format :

[
    {
      Title: 'Meeting with John',
      Subtitle: 'About the new project',
      DayIndex: 1,
      StartTime: '08:30',
      EndTime: '09:30',
      Color: "#56b7fc"
    }
]

Appointment object

| Key | Description | Type | Required |--|--|--|--| | Title | Title of the appointment | string | Required | Subtitle | Text under the title | string | No required | DayIndex | Day index of appointment 1 : Monday 2 : Tuesday 3 : Wednesday ... | number | Required | StartTime | Start time of the appointment with format: hh:mm | string | Required | EndTime | End time of the appointment with format: hh:mm | string | Required | Color | Background color of the appointment | ColorValue | No required

Language

The lang prop allows to choose the language of component.

Values of this prop :

  • en : English language
  • fr : French language

Author

Admandev

Donation

If you like my work, you can make a donation.

Licence

Released under the MIT License.