-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
wallet-ext: copy to clipboard use toast for confirmation feedback #7583
wallet-ext: copy to clipboard use toast for confirmation feedback #7583
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 4 Ignored Deployments
|
}; | ||
|
||
export function useCopyToClipboard( | ||
txpToCopy: string, |
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.
txtToCopy
?
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.
Thanks renamed it
Is the toast height correct? |
8910aaa
to
3c29e5d
Compare
064ab94
to
e5c4199
Compare
Should be the same as it already is in main, I did't change it. |
Could you please double check if we are using the correct size in main? |
There was some extra margin from the lib, addressed here |
| before | after | | - | - | | <img width="417" alt="Screenshot 2023-01-26 at 18 13 51" src="https://user-images.githubusercontent.com/10210143/214917095-59a744a2-d728-48db-875f-a41f93a52f01.png"> | <img width="417" alt="Screenshot 2023-01-26 at 18 14 05" src="https://user-images.githubusercontent.com/10210143/214917146-6999f18b-95fc-48da-bf04-e5fc45ee1afa.png"> | addresses #7583 (comment)
e5c4199
to
f69dd7e
Compare
return ( | ||
<span | ||
className={cl(st.container, className)} | ||
onClick={!copyOnlyOnIconClick ? copyToClipboard : undefined} | ||
> | ||
{children} | ||
<Icon | ||
className={cl(st.copyIcon, st[mode], { [st.copied]: copied })} | ||
className={cl(st.copyIcon, st[mode])} |
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.
can we use Tailwind here
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.
We can but this component has other usages of css modules and classes and I think it's better to address them in an another PR that will do only that
* show a toast instead of scaling the copy icon * move copy to functionality to hooks to reuse it * also removes unused code for rendering sui objects
f69dd7e
to
c84fb26
Compare
| before | after | | - | - | | <img width="417" alt="Screenshot 2023-01-26 at 18 13 51" src="https://user-images.githubusercontent.com/10210143/214917095-59a744a2-d728-48db-875f-a41f93a52f01.png"> | <img width="417" alt="Screenshot 2023-01-26 at 18 14 05" src="https://user-images.githubusercontent.com/10210143/214917146-6999f18b-95fc-48da-bf04-e5fc45ee1afa.png"> | addresses #7583 (comment)
) * show a toast instead of scaling the copy icon * move copy to functionality to hooks to reuse it * also removes unused code for rendering sui objects before https://user-images.githubusercontent.com/10210143/214037484-97443686-66eb-49bc-a550-fe39c7d6aa69.mov after https://user-images.githubusercontent.com/10210143/214036853-6cf71f8e-7b8e-4dda-acf5-c4c64d5fd3f9.mov https://user-images.githubusercontent.com/10210143/214036872-53ca8228-75bc-4135-aa1a-71e643e92252.mov part of APPS-296
before
Screen.Recording.2023-01-23.at.12.14.26.mov
after
Screen.Recording.2023-01-23.at.12.11.12.mov
Screen.Recording.2023-01-23.at.12.11.34.mov
part of APPS-296