EditBox inline (#70)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2021-08-27 00:22:14 +03:00 committed by GitHub
parent 41fb72d563
commit bf814b5a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -44,7 +44,7 @@
}) })
</script> </script>
<div class="flex-col" style="{width ? 'width: ' + width : ''}" <div class="container" style="{width ? 'width: ' + width : ''}"
on:click={() => { input.focus() }} on:click={() => { input.focus() }}
> >
<div class="hidden-text" bind:this={text}></div> <div class="hidden-text" bind:this={text}></div>
@ -57,6 +57,11 @@
</div> </div>
<style lang="scss"> <style lang="scss">
.container {
display: inline-flex;
flex-direction: column;
}
.label { .label {
margin-bottom: .25rem; margin-bottom: .25rem;
font-size: .75rem; font-size: .75rem;
@ -68,7 +73,7 @@
} }
input { input {
height: 1.25rem; height: 1.5rem;
margin: -4px; margin: -4px;
padding: 2px; padding: 2px;
border: 2px solid transparent; border: 2px solid transparent;

View File

@ -51,7 +51,7 @@
on:drop|preventDefault|stopPropagation={drop}> on:drop|preventDefault|stopPropagation={drop}>
<div class="flex-col-center"> <div class="flex-col-center">
<div class="avatar"></div> <div class="avatar"></div>
<div class="name"><EditBox placeholder="John"/><EditBox placeholder="Appleseed"/></div> <div class="name"><EditBox placeholder="John"/>&nbsp;<EditBox placeholder="Appleseed"/></div>
<div class="title">Candidate title</div> <div class="title">Candidate title</div>
<!-- <input type="file" name="file" id="file"/> --> <!-- <input type="file" name="file" id="file"/> -->
</div> </div>