0.1.10 • Published 9 months ago

react-period-display v0.1.10

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

React Period Display

A React component that renders content based on real-time checks of specified start and end dates. This component is useful for displaying content that should only be visible during a certain time period.

Features

  • Display content based on a start date.
  • Display content until an end date.

Installation

You can install the PeriodDisplay component via npm:

npm i react-period-display

Usage

To use the PeriodDisplay component, first import it into your React application:

import PeriodDisplay from 'react-period-display';

Next, implement the component in your application like this:

<PeriodDisplay showStart={yourStartDate} showEnd={yourEndDate}>
  Your content here
</PeriodDisplay>

Examples

Example 1: Display Content Until End Date

<PeriodDisplay showEnd={new Date('2024/10/23 17:21:20')}>
  Display content until the end date 
</PeriodDisplay>

Example 2: Display Content After Start Date

<PeriodDisplay showStart={new Date('2024/10/23 17:21')}>
  Display content after the start date
</PeriodDisplay>

Example 3: Display Content Within a Specific Period

<PeriodDisplay showStart={startDate} showEnd={endDate}>
  Display content within the period of start and end date
</PeriodDisplay>

License

This project is licensed under the MIT License. See the LICENSE file for details.

0.1.10

9 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.9

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago