Skip to content

Commit ebbeacd

Browse files
committed
fix(common): update textfield css
1 parent 19c0e6a commit ebbeacd

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/components/common/typography/TextField.vue

+14-5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ defineProps({
2020
type: String,
2121
required: false,
2222
},
23+
valueWidth: {
24+
type: String,
25+
required: false,
26+
},
2327
value: {
2428
type: [String, Number, Boolean],
2529
required: false,
@@ -88,7 +92,11 @@ const { openTab } = useLinksStore();
8892
<NFlex
8993
class="detail"
9094
:class="{ grow, array, disabled, vertical }"
91-
:style="{ '--prefix-min-width': labelWidth, '--text-flex': flex }"
95+
:style="{
96+
'--prefix-min-width': labelWidth,
97+
'--text-flex': flex,
98+
'--value-min-width': valueWidth,
99+
}"
92100
:align="align"
93101
:wrap="wrap"
94102
:vertical="vertical"
@@ -131,7 +139,7 @@ const { openTab } = useLinksStore();
131139
<style lang="scss" scoped>
132140
.prefix {
133141
flex: 0 0 auto;
134-
align-self: center;
142+
align-self: baseline;
135143
min-width: var(--prefix-min-width, 4rem);
136144
color: var(--white-50);
137145
font-weight: 600;
@@ -141,7 +149,7 @@ const { openTab } = useLinksStore();
141149
.value {
142150
flex: 1 1 auto;
143151
align-self: center;
144-
min-width: max-content;
152+
min-width: var(--value-min-width, max-content);
145153
}
146154
147155
.disabled {
@@ -153,12 +161,13 @@ const { openTab } = useLinksStore();
153161
.detail {
154162
flex: var(--text-flex);
155163
align-items: baseline;
156-
min-width: max-content;
164+
min-width: var(--value-min-width, max-content);
157165
158166
&.vertical {
159167
width: 100%;
160168
161169
.prefix {
170+
align-self: center;
162171
min-width: var(--prefix-min-width, max-content);
163172
}
164173
}
@@ -176,7 +185,7 @@ const { openTab } = useLinksStore();
176185
&.array {
177186
flex: 1 1 auto;
178187
width: 100%;
179-
min-width: fit-content;
188+
min-width: var(--value-min-width, fit-content);
180189
181190
.prefix {
182191
align-self: baseline;

src/components/views/settings/SettingsAccount.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ onDeactivated(() => {
372372
--n-avatar-size-override: 8rem;
373373
374374
flex: 0 0 auto;
375+
margin-right: 1rem;
375376
overflow: hidden;
376377
background: var(--bg-black-softer);
377378
border-radius: 50%;
@@ -388,7 +389,6 @@ onDeactivated(() => {
388389
flex: 1 1 auto;
389390
min-width: fit-content;
390391
max-width: calc(100% - 128px - 2rem); // 100% - image - (margin + gap)
391-
margin-left: 1rem;
392392
}
393393
394394
%flex-auto {

0 commit comments

Comments
 (0)