Skip to content

Commit 600f417

Browse files
authored
Merge branch 'develop' into olu/ppom-sepolia
2 parents e51b433 + 5915234 commit 600f417

File tree

16 files changed

+378
-27
lines changed

16 files changed

+378
-27
lines changed

app/_locales/en/messages.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/components/app/alerts/alerts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Alerts = ({ history }) => {
1818
if (_invalidCustomNetworkAlertIsOpen) {
1919
return <InvalidCustomNetworkAlert history={history} />;
2020
}
21-
if (_unconnectedAccountAlertIsOpen) {
21+
if (_unconnectedAccountAlertIsOpen && !process.env.MULTICHAIN) {
2222
return <UnconnectedAccountAlert />;
2323
}
2424

ui/components/component-library/button-base/button-base.types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface ButtonBaseStyleUtilityProps
5252
/**
5353
* iconProps accepts all the props from Icon
5454
*/
55-
startIconProps?: IconProps<'span'>;
55+
startIconProps?: Partial<IconProps<'span'>>;
5656
/**
5757
* Add icon to end (right side) of button text passing icon name
5858
* The name of the icon to display. Should be one of IconName
@@ -61,11 +61,11 @@ export interface ButtonBaseStyleUtilityProps
6161
/**
6262
* iconProps accepts all the props from Icon
6363
*/
64-
endIconProps?: IconProps<'span'>;
64+
endIconProps?: Partial<IconProps<'span'>>;
6565
/**
6666
* iconLoadingProps accepts all the props from Icon
6767
*/
68-
iconLoadingProps?: IconProps<'span'>;
68+
iconLoadingProps?: Partial<IconProps<'span'>>;
6969
/**
7070
* Boolean to show loading spinner in button
7171
*/

ui/components/component-library/button-link/button-link.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
font-size: inherit;
4444
line-height: inherit;
4545
letter-spacing: inherit;
46+
47+
&__icon {
48+
top: 0;
49+
}
4650
}
4751

4852
&--size-inherit:hover:not(&--disabled) {

ui/components/component-library/button-link/button-link.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export const ButtonLink: ButtonLinkComponent = React.forwardRef(
1919
disabled = false,
2020
loading = false,
2121
size = ButtonLinkSize.Auto,
22+
endIconProps,
23+
startIconProps,
2224
...props
2325
}: ButtonLinkProps<C>,
2426
ref?: PolymorphicRef<C>,
@@ -41,10 +43,24 @@ export const ButtonLink: ButtonLinkComponent = React.forwardRef(
4143
startIconProps={{
4244
size:
4345
size === ButtonLinkSize.Inherit ? IconSize.Inherit : IconSize.Sm,
46+
...startIconProps,
47+
className:
48+
size === ButtonLinkSize.Inherit
49+
? `mm-button-link--size-inherit__icon ${
50+
startIconProps?.className || ''
51+
}`
52+
: '',
4453
}}
4554
endIconProps={{
4655
size:
4756
size === ButtonLinkSize.Inherit ? IconSize.Inherit : IconSize.Sm,
57+
...endIconProps,
58+
className:
59+
size === ButtonLinkSize.Inherit
60+
? `mm-button-link--size-inherit__icon ${
61+
endIconProps?.className || ''
62+
}`
63+
: '',
4864
}}
4965
iconLoadingProps={{
5066
size:

ui/components/multichain/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ export { AvatarGroup } from './avatar-group';
2525
export { AssetPickerAmount } from './asset-picker-amount';
2626
export { AddressListItem } from './address-list-item';
2727
export { ConnectedStatus } from './connected-status';
28+
export { Toast, ToastContainer } from './toast';

ui/components/multichain/multichain-components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727
@import 'asset-picker-amount';
2828
@import 'asset-picker-amount/asset-picker';
2929
@import 'asset-picker-amount/asset-picker-modal';
30+
@import 'toast';
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Toast should render Toast component 1`] = `
4+
<div>
5+
<div
6+
class="mm-box mm-banner-base mm-box--padding-3 mm-box--display-flex mm-box--gap-2 mm-box--background-color-background-default mm-box--rounded-sm"
7+
data-theme="light"
8+
>
9+
<div
10+
class="mm-box mm-box--min-width-0"
11+
>
12+
<div
13+
class="mm-box mm-box--display-flex mm-box--gap-4"
14+
>
15+
<div
16+
class="mm-box mm-text mm-avatar-base mm-avatar-base--size-md mm-avatar-account mm-text--body-sm mm-text--text-transform-uppercase mm-box--display-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-text-default mm-box--background-color-background-alternative mm-box--rounded-full mm-box--border-color-transparent box--border-style-solid box--border-width-1"
17+
>
18+
<div
19+
class="mm-avatar-account__jazzicon"
20+
>
21+
<div
22+
style="border-radius: 50px; overflow: hidden; padding: 0px; margin: 0px; width: 32px; height: 32px; display: inline-block; background: rgb(24, 165, 242);"
23+
>
24+
<svg
25+
height="32"
26+
width="32"
27+
x="0"
28+
y="0"
29+
>
30+
<rect
31+
fill="#018E8C"
32+
height="32"
33+
transform="translate(6.427263444332595 -1.7203295797723996) rotate(470.8 16 16)"
34+
width="32"
35+
x="0"
36+
y="0"
37+
/>
38+
<rect
39+
fill="#F93301"
40+
height="32"
41+
transform="translate(1.1564119766476293 16.128853746500315) rotate(198.5 16 16)"
42+
width="32"
43+
x="0"
44+
y="0"
45+
/>
46+
<rect
47+
fill="#FA6800"
48+
height="32"
49+
transform="translate(22.348080171264016 5.115369684577057) rotate(148.9 16 16)"
50+
width="32"
51+
x="0"
52+
y="0"
53+
/>
54+
</svg>
55+
</div>
56+
</div>
57+
</div>
58+
<div
59+
class="mm-box"
60+
>
61+
<p
62+
class="mm-box mm-text mm-text--body-md mm-box--color-text-default"
63+
>
64+
This is the Toast text
65+
</p>
66+
<button
67+
class="mm-box mm-text mm-button-base mm-button-link mm-button-link--size-auto mm-text--body-md-medium mm-box--padding-0 mm-box--padding-right-0 mm-box--padding-left-0 mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-primary-default mm-box--background-color-transparent"
68+
>
69+
Take some action
70+
</button>
71+
</div>
72+
</div>
73+
</div>
74+
<button
75+
aria-label="[close]"
76+
class="mm-box mm-button-icon mm-button-icon--size-sm mm-banner-base__close-button mm-box--margin-left-auto mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-icon-default mm-box--background-color-transparent mm-box--rounded-lg"
77+
>
78+
<span
79+
class="mm-box mm-icon mm-icon--size-sm mm-box--display-inline-block mm-box--color-inherit"
80+
style="mask-image: url('./images/icons/close.svg');"
81+
/>
82+
</button>
83+
</div>
84+
</div>
85+
`;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.toasts-container {
2+
position: sticky;
3+
bottom: 10px;
4+
margin-inline-start: 10px;
5+
margin-inline-end: 10px;
6+
z-index: 200;
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ToastContainer, Toast } from './toast';

0 commit comments

Comments
 (0)