-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Dropdown for Installation Commands on Homepage #1612
feat: Add Dropdown for Installation Commands on Homepage #1612
Conversation
This commit adds a dropdown menu in the landing page banner component that allows users to select different package manager options for the installation command. The dropdown menu includes options for npm, yarn, pnpm, and bunx. When a user clicks on one of the options, the corresponding command is copied to their clipboard. Icons indicating the copy and success status are also displayed when the command is copied.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Jacksonmills is attempting to deploy a commit to the t3-oss Team on Vercel. A member of the Team first needs to authorize it. |
- Added event listener to close the dropdown menu when user clicks outside of the menu or toggle button. - The event listener checks if the clicked element is outside the dropdown menu and toggle button, and if so, hides the menu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, but could you make it match the language selector more?
CleanShot.2023-10-20.at.09.13.51.mp4
Ah yes! That would make a lot more sense, I will update that tomorrow 🫡 |
I think bun command should be |
Okay noted, thanks! Bunx command I got from the readme doc( I'll remove the change set once I push the headlessui change, making it much more inline with the docs style |
This commit adds a new component called `ClipboardSelect` to the landing page. The component displays a dropdown menu with installation commands for different package managers, such as npm, yarn, pnpm, and bunx. The user can click on a command to copy it to the clipboard. The dropdown menu appears when the user clicks on a button and disappears when the user clicks outside of the menu or on the button again. The component also includes animations for the copy and check icons, creating a visual feedback when copying commands.
I removed the changeset but now the CI is mad, is that something y'all just override once you review? |
…he menu corners style. The changes update the class name in the ClipboardSelect component to use the "bg-primary" class instead of "bg-violet-500" to achieve the desired background color. This ensures consistency with the menu style.
Something I am noticing is that e.g. both dropdown containers have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bun create t3-app
bun
?
Hey t3-oss/translators! This PR contains changes to your language. Please review the changes ❤️. AR: @a4addel, @Sboonny | ES: | FR: @Defranos, @joachimjusth, @vdeva | JA: @t6adev, @uehaj | NO: @estubmo, @josephayman | PL: @matibox, @Infiplaya, @PiotrekPKP | PT: @minsk-dev, @Sn0wye, @victoriaquasar, @MattFerreira18, @gilhrpenner | RU: @AmadeusTwi, @ronanru, @JohnBakhmat | ZH-HANS: @fernandoxu, @escwxyz |
Sorry for the confusion, but we still want the @latest - my bad for being unclear 😐 |
xD np I'll update in a bit. So: |
Lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your patience
np! stoked you guys liked the change, hope to contribute more soon 🫡💖 |
Closes #1609
✅ Checklist
Changelog
Add dropdown for different package manager copy to clipboard options on homepage
Screenshots
🫡💖