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

fix: translate crash #1034

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ui/material-ui/src/WalletDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const WalletDialog: FC<WalletDialogProps> = ({
</Collapse>
<ListItem>
<Button onClick={handleExpandClick}>
{expanded ? 'Less' : 'More'} options
{`${expanded ? 'Less' : 'More'} options`}
{expanded ? <CollapseIcon /> : <ExpandIcon />}
</Button>
</ListItem>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/react-ui/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Button: FC<ButtonProps> = (props) => {
type="button"
>
{props.startIcon && <i className="wallet-adapter-button-start-icon">{props.startIcon}</i>}
{props.children}
<span className="wallet-adapter-button-span">{props.children}</span>
{props.endIcon && <i className="wallet-adapter-button-end-icon">{props.endIcon}</i>}
</button>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/react-ui/src/WalletListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const WalletListItem: FC<WalletListItemProps> = ({ handleClick, tabIndex,
<li>
<Button onClick={handleClick} startIcon={<WalletIcon wallet={wallet} />} tabIndex={tabIndex}>
{wallet.adapter.name}
{wallet.readyState === WalletReadyState.Installed && <span>Detected</span>}
{wallet.readyState === WalletReadyState.Installed && <span className="detected">Detected</span>}
</Button>
</li>
);
Expand Down
6 changes: 4 additions & 2 deletions packages/ui/react-ui/src/WalletModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const WalletModal: FC<WalletModalProps> = ({ className = '', container =
onClick={handleCollapseClick}
tabIndex={0}
>
<span>{expanded ? 'Less ' : 'More '}options</span>
<span>{`${expanded ? 'Less' : 'More'} options`}</span>
<svg
width="13"
height="7"
Expand Down Expand Up @@ -196,7 +196,9 @@ export const WalletModal: FC<WalletModalProps> = ({ className = '', container =
onClick={handleCollapseClick}
tabIndex={0}
>
<span>{expanded ? 'Hide ' : 'Already have a wallet? View '}options</span>
<span>
{`${expanded ? 'Hide' : 'Already have a wallet? View'} options`}
</span>
<svg
width="13"
height="7"
Expand Down
7 changes: 6 additions & 1 deletion packages/ui/react-ui/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@
height: 28px;
}

.wallet-adapter-modal-list .wallet-adapter-button span {
.wallet-adapter-modal-list .wallet-adapter-button-span {
display: inline-flex;
flex-basis: 100%;
}

.wallet-adapter-modal-list .wallet-adapter-button-span .detected {
margin-left: auto;
font-size: 14px;
opacity: .6;
Expand Down