Skip to content

Commit 4303959

Browse files
committed
fixes
1 parent 8553c04 commit 4303959

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

packages/repl/src/lib/Input/ComponentSelector.svelte

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
{#each workspace.files as File[] as file, index (file.name)}
7575
<div
7676
class="button"
77+
class:editable={file.name !== 'App.svelte'}
7778
role="button"
7879
tabindex="0"
7980
class:active={file === workspace.current}
@@ -98,7 +99,7 @@
9899
>
99100
<i class="drag-handle"></i>
100101

101-
<span class:editable={file.name !== 'App.svelte'}>
102+
<span class="filename">
102103
{(file === workspace.current && file.name !== 'App.svelte' ? input_value : file.name) +
103104
(workspace.modified[file.name] ? '*' : '') || ' '}
104105
</span>
@@ -137,7 +138,7 @@
137138
}}
138139
onkeyup={(e) => e.key === ' ' && remove_file(file)}
139140
>
140-
<svg width="12" height="12" viewBox="0 0 24 24">
141+
<svg viewBox="0 0 24 24">
141142
<line stroke="#999" x1="18" y1="6" x2="6" y2="18" />
142143
<line stroke="#999" x1="6" y1="6" x2="18" y2="18" />
143144
</svg>
@@ -204,7 +205,12 @@
204205
}
205206
206207
.file-tabs .button {
207-
padding: 0 1rem 0 2em;
208+
--padding: 0 1.4rem 0 2.6rem;
209+
padding: var(--padding);
210+
211+
&.editable {
212+
--padding: 0 1.8rem 0 2.6rem;
213+
}
208214
209215
.drag-handle {
210216
cursor: move;
@@ -220,13 +226,17 @@
220226
.remove {
221227
position: absolute;
222228
display: none;
223-
right: 1px;
224-
top: 4px;
225-
width: 16px;
226-
text-align: right;
227-
padding: 12px 0 12px 5px;
228-
font-size: 8px;
229+
top: 0;
230+
right: 0;
231+
padding: 0 0.2rem;
232+
width: 1.6rem;
233+
height: 100%;
229234
cursor: pointer;
235+
236+
svg {
237+
width: 100%;
238+
height: 100%;
239+
}
230240
}
231241
232242
&.drag-over {
@@ -237,7 +247,7 @@
237247
&.active {
238248
border-bottom: 1px solid var(--sk-fg-accent);
239249
240-
.editable {
250+
&.editable .filename {
241251
cursor: text;
242252
}
243253
@@ -262,7 +272,7 @@
262272
justify-content: center;
263273
font-family: var(--sk-font-family-ui);
264274
font: var(--sk-font-ui-small); /* TODO can we just inherit */
265-
padding: 0 1rem 0 2em;
275+
padding: var(--padding);
266276
box-sizing: border-box;
267277
268278
&:focus {

0 commit comments

Comments
 (0)