igorskyflyer / npm-astro-post-excerpt

⭐ An Astro component that renders post excerpts for your Astro blog - directly from your Markdown and MDX files! 💎 Featured on Astro's official Integrations library: https://astro.build/integrations?search=igor.dvlpr 😍
https://www.npmjs.com/package/@igor.dvlpr/astro-post-excerpt
MIT License
19 stars 2 forks source link

Document possible values with their type #40

Closed bennycode closed 11 months ago

bennycode commented 11 months ago

Hey Igor, I like your PostExcerpt component but by going through the readme I thought I can use it like this:

<PostExcerpt post={post} words={50} smartEllipsis={true} renderer={'Html'} />

Instead I had to use:

<PostExcerpt post={post} words={50} smartEllipsis={true} renderer={PropRenderer.Html} />

With an import like this:

import PostExcerpt, {PropRenderer} from '@igor.dvlpr/astro-post-excerpt'

Which is why I think explicitly listing the possible values make sense. WDYT?

igorskyflyer commented 11 months ago

@bennycode, thanks again for your contribution. 😁👍🏼