Skip to content

Commit 0d37889

Browse files
Vu Van DucVu Van Duc
Vu Van Duc
authored and
Vu Van Duc
committed
feat(ui): update UI
1 parent c16fad1 commit 0d37889

File tree

7 files changed

+78
-50
lines changed

7 files changed

+78
-50
lines changed

src/ui/components/CustomInput/CustomInput.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ ion-item.custom-input {
5757
--padding-top: 0.875rem;
5858
--padding-bottom: 0.875rem;
5959
--padding-start: 1.25rem;
60+
--padding-end: 1.25rem;
6061
--ion-item-border-color: var(--ion-color-neutral-400);
6162
min-height: 3.125rem;
6263

@@ -66,13 +67,14 @@ ion-item.custom-input {
6667
}
6768

6869
ion-button {
69-
width: 2rem;
70-
height: 2rem;
70+
width: 1.5rem;
71+
height: 1.5rem;
7172
margin: auto 0.5rem;
7273
border-radius: 1.5rem;
7374
--background: transparent;
7475
--background-activated: var(--ion-color-neutral-400);
7576
--box-shadow: none;
77+
min-height: auto !important;
7678

7779
&::part(native) {
7880
padding: 0;

src/ui/components/CustomInput/CustomInput.tsx

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -86,37 +86,40 @@ const CustomInput = ({
8686
onIonBlur={() => handleFocus(false)}
8787
onKeyDown={hideKeyboard}
8888
value={value}
89-
/>
90-
{hiddenInput && (
91-
<IonButton
92-
shape="round"
93-
onClick={() => {
94-
setHidden(!hidden);
95-
}}
96-
data-testid={`${dataTestId}-hide-btn`}
97-
>
98-
<IonIcon
99-
slot="icon-only"
100-
icon={hidden ? eyeOutline : eyeOffOutline}
101-
color="primary"
102-
/>
103-
</IonButton>
104-
)}
105-
{action && actionIcon && (
106-
<IonButton
107-
shape="round"
108-
data-testid={`${dataTestId}-action`}
109-
onClick={(e) => {
110-
action(e);
111-
}}
112-
>
113-
<IonIcon
114-
slot="icon-only"
115-
icon={actionIcon}
116-
color="primary"
117-
/>
118-
</IonButton>
119-
)}
89+
>
90+
{hiddenInput && (
91+
<IonButton
92+
shape="round"
93+
onClick={() => {
94+
setHidden(!hidden);
95+
}}
96+
data-testid={`${dataTestId}-hide-btn`}
97+
slot="end"
98+
>
99+
<IonIcon
100+
slot="icon-only"
101+
icon={hidden ? eyeOutline : eyeOffOutline}
102+
color="primary"
103+
/>
104+
</IonButton>
105+
)}
106+
{action && actionIcon && (
107+
<IonButton
108+
shape="round"
109+
data-testid={`${dataTestId}-action`}
110+
onClick={(e) => {
111+
action(e);
112+
}}
113+
slot="end"
114+
>
115+
<IonIcon
116+
slot="icon-only"
117+
icon={actionIcon}
118+
color="primary"
119+
/>
120+
</IonButton>
121+
)}
122+
</IonInput>
120123
</div>
121124
</IonItem>
122125
);

src/ui/components/PageHeader/PageHeader.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
font-size: 1rem;
6363
font-weight: 700;
6464

65+
& > * {
66+
color: var(--ion-color-neutral-700);
67+
}
68+
6569
&.md {
6670
font-size: 0.8rem;
6771
}

src/ui/components/VerifyPassword/VerifyPassword.scss

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,33 @@
3838
--min-height: auto;
3939
}
4040

41-
ion-item.custom-input .input-line {
42-
border: none;
43-
text-align: center;
44-
font-size: 2rem;
45-
}
46-
47-
ion-input {
48-
margin-left: 2rem;
41+
ion-item.custom-input {
42+
&.error {
43+
ion-input {
44+
border-color: var(--ion-color-error-800);
45+
}
46+
}
4947

50-
&[type="password"] {
51-
letter-spacing: 0.25em;
48+
.input-line {
49+
border: none;
5250
}
53-
}
5451

55-
.close-button-label {
56-
color: var(--ion-color-neutral-800);
52+
ion-input {
53+
border: 0.125rem solid var(--ion-color-neutral-700);
54+
border-radius: 0.5rem;
55+
--padding-top: 0.75rem;
56+
--padding-bottom: 0.75rem;
57+
font-weight: 400;
58+
font-size: 1rem;
59+
60+
&.has-focus {
61+
border-color: var(--ion-color-primary-700);
62+
}
63+
64+
&[type="password"] {
65+
letter-spacing: 0.25em;
66+
}
67+
}
5768
}
5869

5970
.error-message {
@@ -91,6 +102,9 @@
91102
text-transform: none !important;
92103
border-radius: 1rem !important;
93104
border: 1px solid var(--ion-color-neutral-400) !important;
94-
height: auto !important;
105+
106+
&.sc-ion-alert-md {
107+
height: auto !important;
108+
}
95109
}
96110
}

src/ui/components/VerifyPassword/VerifyPassword.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ const VerifyPassword = ({
127127
<form className="password-input-container">
128128
<CustomInput
129129
dataTestId="verify-password-value"
130-
hiddenInput={true}
131-
autofocus={true}
130+
hiddenInput
131+
autofocus
132132
onChangeInput={setVerifyPasswordValue}
133133
value={verifyPasswordValue}
134+
error={showError}
134135
/>
135136
{showError ? (
136137
<ErrorMessage

src/ui/pages/CreateSSIAgent/CreateSSIAgent.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
}
2020
}
2121

22+
.open-info {
23+
margin-bottom: 1.5rem;
24+
}
25+
2226
& > * {
2327
margin: 0;
2428
}

src/ui/pages/CreateSSIAgent/CreateSSIAgent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ const CreateSSIAgent = () => {
436436
<div>
437437
<IonButton
438438
fill="outline"
439-
className="copy-button secondary-button"
439+
className="open-info secondary-button"
440440
onClick={() => setOpenInfo(true)}
441441
>
442442
<IonIcon

0 commit comments

Comments
 (0)