Skip to content

Commit d8cd247

Browse files
authored
Added minimize/maximize toasts (#272)
* Added min/max toasts * Update changelog * Replace icon
1 parent 88ba5d7 commit d8cd247

File tree

10 files changed

+1615
-2105
lines changed

10 files changed

+1615
-2105
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- [Added minimize/maximize action for toasts](https://github.com/multiversx/mx-sdk-dapp-ui/pull/272)
1011
- [Eslint and prettierrc fixes](https://github.com/multiversx/mx-sdk-dapp-ui/pull/270)
1112
- [Refactored sign transactions panel internal components](https://github.com/multiversx/mx-sdk-dapp-ui/pull/267)
1213

src/common/Icon/Icon.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import { CopyIcon } from './components/CopyIcon';
2323
import { HourglassIcon } from './components/HourglassIcon';
2424
import { LayersIcon } from './components/LayersIcon';
2525
import { LockIcon } from './components/LockIcon';
26+
import { MaximizeIcon } from './components/MaximizeIcon';
27+
import { MinimizeIcon } from './components/MinimizeIcon';
2628
import { PencilIcon } from './components/PencilIcon';
2729
import { SpinnerIcon } from './components/SpinnerIcon';
2830
import { TriangularWarningIcon } from './components/TriangularWarningIcon';
@@ -112,6 +114,12 @@ export const Icon = ({ name, ...properties }: IconPropsType) => {
112114
case 'arrow-right':
113115
return <ArrowRightIcon />;
114116

117+
case 'minimize':
118+
return <MinimizeIcon />;
119+
120+
case 'maximize':
121+
return <MaximizeIcon />;
122+
115123
default:
116124
console.error(`No data for the ${name} icon.`);
117125
return null;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { h } from '@stencil/core';
2+
3+
const styles = {
4+
maximizeIcon: 'mvx:text-inherit',
5+
} satisfies Record<string, string>;
6+
7+
export const MaximizeIcon = ({ class: className }: { class?: string }) => (
8+
<svg
9+
xmlns="http://www.w3.org/2000/svg"
10+
width="20"
11+
height="20"
12+
viewBox="0 0 448 512"
13+
fill="currentColor"
14+
class={{ [styles.maximizeIcon]: true, [className]: Boolean(className) }}
15+
>
16+
<path d="M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z" />
17+
</svg>
18+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './MaximizeIcon';
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { h } from '@stencil/core';
2+
3+
const styles = {
4+
minimizeIcon: 'mvx:text-inherit',
5+
} satisfies Record<string, string>;
6+
7+
export const MinimizeIcon = ({ class: className }: { class?: string }) => (
8+
<svg
9+
xmlns="http://www.w3.org/2000/svg"
10+
width="20"
11+
height="20"
12+
viewBox="0 0 448 512"
13+
fill="currentColor"
14+
class={{ [styles.minimizeIcon]: true, [className]: Boolean(className) }}
15+
>
16+
<path
17+
d="M160 64c0-17.7-14.3-32-32-32S96 46.3 96 64l0 64-64 0c-17.7 0-32
18+
14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32
19+
14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3
20+
32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32
21+
14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3
22+
32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32
23+
32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3
24+
32-32s-14.3-32-32-32l-96 0z"
25+
/>
26+
</svg>
27+
);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './MinimizeIcon';

src/common/Icon/icon.types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export enum IconNamesEnum {
2727
arrowsRotate = 'arrows-rotate',
2828
spinner = 'spinner',
2929
arrowRight = 'arrow-right',
30+
minimize = 'minimize',
31+
maximize = 'maximize',
3032
}
3133

3234
export type IconPropsType = JSXBase.IntrinsicElements['svg'] & {

0 commit comments

Comments
 (0)