-
Notifications
You must be signed in to change notification settings - Fork 208
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
fix(wallet/ui): style connection component better #5984
Conversation
const pathStyle = { fill: '#bb2d40' }; | ||
|
||
return ( | ||
<svg |
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.
For some reason loading a static resource was messing with the ability of the bridge to connect to localstorage, so just include this in the bundle
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.
I recall there are some bad ways to use SVG in React but I don't remember whether this is one of them :) Either way, seems fine for now. Optimize after correctness.
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.
Fixed in d823ccd, but I'll leave this in anyway because it's small enough and will look better not loading in separately.
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.
Some suggestions, none blocking
const pathStyle = { fill: '#bb2d40' }; | ||
|
||
return ( | ||
<svg |
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.
I recall there are some bad ways to use SVG in React but I don't remember whether this is one of them :) Either way, seems fine for now. Optimize after correctness.
packages/wallet/ui/src/bridge.jsx
Outdated
); | ||
const Bridge = () => { | ||
return ( | ||
<button className="button" onClick={signalBridge}> |
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.
button.button
is a funny target. consider an id
since there will be exactly one in the DOM:
<button className="button" onClick={signalBridge}> | |
<button id="signalWallet" onClick={signalBridge}> |
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.
Changed to signal-wallet-button
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.
That might have been me, aiming for type=button, which suppresses form submission, iirc
refs: Agoric/dapp-treasury#137