0.0.1 ⢠Published 2 years ago
@silverage/the-read-time v0.0.1
the-read-time š±šš£
Show the read time in emoji
šØ 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
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