0.0.1 • Published 2 years ago

@silverage/the-read-time v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

the-read-time šŸ±šŸ”šŸ£

Show the read time in emoji

The-Persistence-of-Memory_m

šŸŽØ Features

  • Show the read time in emoji automatically. like šŸ±šŸ”šŸ£21'10"
  • Support reading speed setting.
  • You can choose your emoji.
  • Make your own custom display.

Installation

pnpm add @silverage/the-read-time

Usage

import { TheReadTime } from '@silverage/the-read-time'

<TheReadTime>
  {/* your article */}
</TheReadTime>

šŸŖ„ Boom! The read time will show top the article

image

Options

steps

type: Step[]

default: [{icon:"šŸ£",minutes:1},{icon:"šŸ”",minutes:5},{icon:"šŸ±",minutes:15}]

Using steps to change the emoji and its time consuming.

speed

type: number

default: 200

It's how many words can be read per minute.

time

type: number

default: undefined

Set this will skip the read time calculation, and just use this number as total read time to convert to emoji.

displayRender

type: (emoji: ReactNode[], totalTime: number) => ReactNode

default: undefined

You can make your own custom display by this option.

0.0.1

2 years ago