Skip to content

Commit a3a405c

Browse files
Updated UI (#380)
1 parent b8dfa41 commit a3a405c

File tree

2 files changed

+31
-32
lines changed

2 files changed

+31
-32
lines changed

src/initConfig.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import './styles/style.css';
33

44
import { walletConnectV2ProjectId } from 'config';
55

6-
import { EnvironmentsEnum, InitAppType } from './lib';
7-
8-
/*
96
// Enable this block to showcase a custom provider implementation
107

118
import { EnvironmentsEnum, ICustomProvider, InitAppType } from './lib';
@@ -23,7 +20,6 @@ const providers: ICustomProvider[] = [
2320
(window as any).multiversx = {};
2421
// Option 1: Add providers using the `window.providers` array
2522
(window as any).multiversx.providers = providers;
26-
*/
2723

2824
export const config: InitAppType = {
2925
storage: { getStorageCallback: () => sessionStorage },

src/provider/LoginModal.tsx

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import React from 'react';
22
import { createPortal } from 'react-dom';
33
import { createRoot } from 'react-dom/client';
44

5-
import { Button } from 'components';
6-
75
const modalStyles = {
86
overlay: {
97
position: 'fixed' as const,
@@ -35,7 +33,8 @@ const modalStyles = {
3533
backgroundColor: '#FFF',
3634
width: '100%',
3735
borderRadius: '4px',
38-
border: '1px solid #ccc'
36+
border: '1px solid #ccc',
37+
color: 'black'
3938
},
4039
buttonGroup: {
4140
display: 'flex',
@@ -44,17 +43,21 @@ const modalStyles = {
4443
marginTop: '15px'
4544
},
4645
button: {
47-
backgroundColor: '#2563eb',
48-
color: 'white',
49-
padding: '8px 16px',
50-
borderRadius: '8px',
51-
border: 'none',
46+
backgroundColor: 'var(--mvx-button-bg-primary)',
47+
color: 'var(--mvx-button-text-primary)',
48+
paddingLeft: '16px',
49+
paddingRight: '16px',
50+
borderRadius: '12px',
5251
cursor: 'pointer',
53-
fontSize: '14px',
54-
fontWeight: '500',
55-
':hover': {
56-
backgroundColor: '#1d4ed8'
57-
}
52+
height: '40px'
53+
},
54+
title: {
55+
color: 'var(--mvx-text-color-primary)',
56+
fontSize: '20px'
57+
},
58+
label: {
59+
color: 'var(--mvx-text-color-secondary)',
60+
fontSize: '16px'
5861
}
5962
};
6063

@@ -67,7 +70,10 @@ const containerStyles = {
6770
padding: modalStyles.modal.padding,
6871
borderRadius: '8px',
6972
width: '100%',
70-
maxWidth: '100%'
73+
maxWidth: '100%',
74+
display: 'flex',
75+
flexDirection: 'column',
76+
gap: '10px'
7177
}
7278
};
7379

@@ -97,11 +103,12 @@ const Modal = ({ onSubmit, onClose, needsAddress, anchor }: ModalProps) => {
97103
return createPortal(
98104
<div style={styles.overlay}>
99105
<div style={styles.modal}>
100-
<h2>Authenticate</h2>
106+
<label style={styles.title}>Authenticate</label>
107+
101108
<form onSubmit={handleSubmit} style={styles.form}>
102109
{needsAddress && (
103110
<div>
104-
<label>
111+
<label style={styles.label}>
105112
Address
106113
<input
107114
style={styles.input}
@@ -115,7 +122,7 @@ const Modal = ({ onSubmit, onClose, needsAddress, anchor }: ModalProps) => {
115122
</div>
116123
)}
117124
<div>
118-
<label>
125+
<label style={styles.label}>
119126
Private Key
120127
<input
121128
style={styles.input}
@@ -128,17 +135,13 @@ const Modal = ({ onSubmit, onClose, needsAddress, anchor }: ModalProps) => {
128135
</label>
129136
</div>
130137
<div style={styles.buttonGroup}>
131-
<Button
132-
onClick={onClose}
133-
label='Cancel'
134-
{...{ style: styles.button }}
135-
/>
136-
137-
<Button
138-
type='submit'
139-
label='Submit'
140-
{...{ style: styles.button }}
141-
/>
138+
<button onClick={onClose} style={styles.button}>
139+
Cancel
140+
</button>
141+
142+
<button type='submit' style={styles.button}>
143+
Submit
144+
</button>
142145
</div>
143146
</form>
144147
</div>

0 commit comments

Comments
 (0)