Remove file input ID, add margin to card
This commit is contained in:
parent
6da83926a0
commit
291f567c8e
|
@ -133,6 +133,7 @@ body {
|
|||
box-shadow: 0 1px 3px rgba(0,0,0,.3);
|
||||
border: 1px solid $border-light;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 32px;
|
||||
|
||||
&.toolkit-dark {
|
||||
background-color: $dark-body;
|
||||
|
|
|
@ -4,7 +4,6 @@ use crate::ButtonKind;
|
|||
pub struct FileInput {
|
||||
pub(crate) name: String,
|
||||
pub(crate) label: String,
|
||||
pub(crate) id: String,
|
||||
pub(crate) kind: ButtonKind,
|
||||
pub(crate) accept: String,
|
||||
pub(crate) classes: Vec<String>,
|
||||
|
@ -14,43 +13,39 @@ pub struct FileInput {
|
|||
}
|
||||
|
||||
impl FileInput {
|
||||
pub fn primary(name: &str, label: &str, id: &str) -> Self {
|
||||
pub fn primary(name: &str, label: &str) -> Self {
|
||||
FileInput {
|
||||
name: name.to_owned(),
|
||||
label: label.to_owned(),
|
||||
id: id.to_owned(),
|
||||
group: true,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn primary_outline(name: &str, label: &str, id: &str) -> Self {
|
||||
pub fn primary_outline(name: &str, label: &str) -> Self {
|
||||
FileInput {
|
||||
name: name.to_owned(),
|
||||
label: label.to_owned(),
|
||||
id: id.to_owned(),
|
||||
kind: ButtonKind::PrimaryOutline,
|
||||
group: true,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn outline(name: &str, label: &str, id: &str) -> Self {
|
||||
pub fn outline(name: &str, label: &str) -> Self {
|
||||
FileInput {
|
||||
name: name.to_owned(),
|
||||
label: label.to_owned(),
|
||||
id: id.to_owned(),
|
||||
kind: ButtonKind::Outline,
|
||||
group: true,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn secondary(name: &str, label: &str, id: &str) -> Self {
|
||||
pub fn secondary(name: &str, label: &str) -> Self {
|
||||
FileInput {
|
||||
name: name.to_owned(),
|
||||
label: label.to_owned(),
|
||||
id: id.to_owned(),
|
||||
kind: ButtonKind::Secondary,
|
||||
group: true,
|
||||
..Default::default()
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@if file.group {
|
||||
<div class="toolkit-button-group">
|
||||
<div class="@file.class_string()">
|
||||
<span id="@file.id">@file.label</span>
|
||||
<span>@file.label</span>
|
||||
@if file.multiple {
|
||||
<input
|
||||
type="file"
|
||||
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
} else {
|
||||
<div class="@file.class_string()">
|
||||
<span id="@file.id">@file.label</span>
|
||||
<span>@file.label</span>
|
||||
@if file.multiple {
|
||||
<input
|
||||
type="file"
|
||||
|
|
Loading…
Reference in a new issue