# react-clock-emoji

> Render the time with an emoji!

Latest version **1.0.1** (published 2023-03-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-clock-emoji
pnpm add react-clock-emoji
yarn add react-clock-emoji
bun add react-clock-emoji
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-03-10 |
| First published | 2023-03-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 343.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joseph Chotard |
| Maintainers | joseph1 |
| Keywords | react, clock, emoji |

## Links

- npm: https://www.npmjs.com/package/react-clock-emoji
- Homepage: https://github.com/JosephChotard/react-clock-emoji
- npm.io page: https://npm.io/package/react-clock-emoji

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-03-10
- 1.0.0 — 2023-03-10

## README

# React Clock Emoji

Simple component that renders the closest clock emoji to the current time.

## Installation

```bash
npm install react-clock-emoji
```

## Usage

```jsx
import React from 'react'

import ClockEmoji from 'react-clock-emoji'

const App = () => {
  return <ClockEmoji time={"15:45"} defaultTime={"12:00"}/>
}
```

## Props

| Name        | Type                                    | Default | Description                                         |
| ----------- | --------------------------------------- | ------- | --------------------------------------------------- |
| time        | `string \| number \| Date \| undefined` | null    | Time to render the clock emoji for.                 |
| defaultTime | `string \| number \| Date`              | null    | Time to render the clock emoji for if time is null. |

If time is a number, it is assumed to be the number of minutes since midnight.
If time is a string, it is assumed to start with "HH:mm".

Time will always be modulates to ensure it is within the allowed range.

---
_Source: https://npm.io/package/react-clock-emoji · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
