Skip to content

Commit 633e138

Browse files
committed
add icon to file upload widget
1 parent 847bb0b commit 633e138

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

client/django-formset/FileUploadWidget.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,14 @@ django-formset .dj-control-panel:has(input[type="file"]) {
9797
text-align: center;
9898
min-width: 8rem;
9999
height: auto;
100+
color: var(--outline-color);
101+
svg {
102+
width: 4rem;
103+
height: auto;
104+
opacity: 0.75;
105+
}
100106
p {
101-
padding: 2rem;
107+
padding: 0.5rem 2rem 0;
102108
margin: 0;
103109
}
104110
}

formset/templates/formset/default/widgets/file.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
{% endwith %}
88
{% endif %}
99
{% block "dropbox" %}
10-
<figure class="dj-dropbox"><div class="dj-empty-item"><p>{% trans "Drag file here" %}</p></div></figure>
10+
<figure class="dj-dropbox">
11+
<div class="dj-empty-item">
12+
{% include "formset/icons/upload.svg" %}
13+
<p>{% trans "Drag file here" %}</p>
14+
</div>
15+
</figure>
1116
{% endblock %}
1217
{% block "controller" %}
1318
<div>
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)