Skip to content
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

Shadcn rainbowkit button + dropdown #937

Merged
merged 12 commits into from
Sep 19, 2024
Merged

Conversation

rin-st
Copy link
Member

@rin-st rin-st commented Sep 15, 2024

Description

Custom rainbowkit button + dropdown implemented with shadcn

See #937 (comment) and #937 (comment) first

Buttons functionality

Screen.Recording.2024-09-15.at.20.32.56.mov

With networks switch

Screen.Recording.2024-09-15.at.20.34.04.mov

Wrong network dropdown

Screen.Recording.2024-09-15.at.20.35.06.mov

Dark theme

Screen.Recording.2024-09-15.at.20.42.31.mov

@technophile-04
Copy link
Collaborator

Hey @rin-st thanks for such detailed explanation love it!

I feel like we shouldn't touch the components added from shadcn yet(unti will we are in dev phase) and let them be stock as it is. Umm I don't want us to mimic daisyUI SE-2 with shadcn and keep it as stock as possible also avoid passing of extra className while using them(until we are in development stage). Its completely fine if things breaks a bit / there very rough conner since things are not final yet.

^ We can always polish stuff later and as you mentioned in #937 (comment) we are also not final on theme yet. When we update we can always again visit this things. Also the reason I say we keep things as close to shadcn without updating much is this will make adding shadcn stuff to SE-2 look more compatible when people start using it.

For example if we update shadcn btn from rounded-md => rounded-full. Now if a developer using SE-2 plans to use Alert component from shadcn he has to manually update that component to bit more rounded.

what do you say? Thanks @rin-st!! Also please fee free to push changes directly to that branch 🙌

@rin-st
Copy link
Member Author

rin-st commented Sep 18, 2024

For example if we update shadcn btn from rounded-md => rounded-full. Now if a developer using SE-2 plans to use Alert component from shadcn he has to manually update that component to bit more rounded.

It completely depends of our default styles. Like now, our buttons are always rounded, so when dev uses <button className='btn' /> its always rounded. So I just kept it as is now.

I feel like we shouldn't touch the components added from shadcn yet(unti will we are in dev phase) and let them be stock as it is. Umm I don't want us to mimic daisyUI SE-2 with shadcn and keep it as stock as possible also avoid passing of extra className while using them(until we are in development stage). Its completely fine if things breaks a bit / there very rough conner since things are not final yet.

But if we want to take default shadcn styles and change it later then ok, let's do it.

@rin-st
Copy link
Member Author

rin-st commented Sep 18, 2024

Reverted ui changes and passing classNames

But I'm not sure regarding the last. We will need to do this anyway, so looks like it's better to keep that classNames from the start, so we will not forget to change it in future.

See, how it looks. With classnames:

Screen.Recording.2024-09-18.at.15.03.09.mov

Without classNames - trigger button padding, dropdown border, buttons width, disconnect color (we can make disconnect button type="destructive", but it will be with red bg, so not so good I think):

Screen.Recording.2024-09-18.at.15.04.43.mov

everything except buttons width is optional for now though

@rin-st
Copy link
Member Author

rin-st commented Sep 19, 2024

Returned full width for menu items for now.
Also fixed a bug, menu items were clickable during closing animation. Fixed version: see where I click to close the menu. Before fixing I'd be disconnected

Screen.Recording.2024-09-19.at.13.44.28.mov

Merging this, I think current state is good enough to move forward

@rin-st rin-st merged commit f1e5c1b into tinker-shadcn Sep 19, 2024
@rin-st rin-st deleted the shadcn-rainbowkit-button branch September 19, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants