HiDeoo / starlight-package-managers

Quickly display npm related commands for multiple package managers in your Starlight documentation site
https://starlight-package-managers.vercel.app
MIT License
17 stars 2 forks source link

Package manager icons #5

Closed Princesseuh closed 6 months ago

Princesseuh commented 7 months ago

Is your feature request related to a problem?

N/A

Describe the solution you'd like

It'd be cool if it'd show icons next to the package managers, like on the Biome website https://biomejs.dev/guides/getting-started/#installation

Describe alternatives you've considered

Well, not having icons, but it's not as nice, right

Additional Context

No response

HiDeoo commented 7 months ago

Oh, I love the idea, this looks super great!

Internally, this component relies on the Starlight built-in <Tabs> component and only builds on top of it to add syncing between the tabs. Unfortunately, the built-in component doesn't support this feature and only accepts a basic string as a tab label.

Replacing the built-in component with a custom one that would literally be 90% the same just to render an extra icon seems meh, so instead I just opened a new feature request in Starlight to add a new icon prop to the <TabItem> component that would accept the name of an icon from the Starlight icon set and render it next to the label.

If this is something of interest (I personally really like the idea), this would be a fairly easy addition, and I already have an unrelated opened PR that adds icons for npm, yarn, and pnpm. We could also add bun too and then this issue would be as good as solved.

HiDeoo commented 6 months ago

All the pre-requisites Starlight PRs have been merged and released and the feature is now available in the new v0.4.0 of the package.

image

Thanks again for the great feature request :raised_hands:

Princesseuh commented 6 months ago

Really cool, awesome work!