@silverage/the-read-time
v0.0.1
Published
Show the read time in Emoji
Readme
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-timeUsage
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
stepsto 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.
