✨ (button): Añade componentes Button y ButtonSet
This commit is contained in:
parent
c8654a5742
commit
99a4837e11
10 changed files with 566 additions and 258 deletions
|
|
@ -138,21 +138,23 @@ async fn form_controls(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
)
|
||||
// Campo oculto (form::Hidden).
|
||||
.with_child(form::Hidden::field("origin", "form-selections"))
|
||||
// Botones de acción.
|
||||
.with_child(Button::submit(Lc::t("btn_submit", &LOC)).with_prop(
|
||||
PropsOp::add_classes(class::ButtonColor::solid(
|
||||
ThemeColor::Primary,
|
||||
)),
|
||||
))
|
||||
.with_child(Button::reset(Lc::t("btn_reset", &LOC)).with_prop(
|
||||
PropsOp::add_classes(class::ButtonColor::outline(
|
||||
ThemeColor::Secondary,
|
||||
)),
|
||||
))
|
||||
// Botonera de acciones.
|
||||
.with_child(
|
||||
Button::plain(Lc::t("btn_cancel", &LOC)).with_prop(
|
||||
PropsOp::add_classes(class::ButtonColor::link()),
|
||||
),
|
||||
button::ButtonSet::new()
|
||||
.with_button(
|
||||
Button::submit(Lc::t("btn_submit", &LOC)).with_style(
|
||||
button::ButtonStyle::Solid(Intent::Primary),
|
||||
),
|
||||
)
|
||||
.with_button(
|
||||
Button::reset(Lc::t("btn_reset", &LOC)).with_style(
|
||||
button::ButtonStyle::Outline(Intent::Secondary),
|
||||
),
|
||||
)
|
||||
.with_button(
|
||||
Button::plain(Lc::t("btn_cancel", &LOC))
|
||||
.with_style(button::ButtonStyle::Link),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
@ -252,21 +254,23 @@ async fn form_controls(request: HttpRequest) -> Result<Markup, ErrorPage> {
|
|||
)
|
||||
// Campo oculto (form::Hidden).
|
||||
.with_child(form::Hidden::field("origin", "form-text"))
|
||||
// Botones de acción.
|
||||
.with_child(Button::submit(Lc::t("btn_submit", &LOC)).with_prop(
|
||||
PropsOp::add_classes(class::ButtonColor::solid(
|
||||
ThemeColor::Primary,
|
||||
)),
|
||||
))
|
||||
.with_child(Button::reset(Lc::t("btn_reset", &LOC)).with_prop(
|
||||
PropsOp::add_classes(class::ButtonColor::outline(
|
||||
ThemeColor::Secondary,
|
||||
)),
|
||||
))
|
||||
// Botonera de acciones.
|
||||
.with_child(
|
||||
Button::plain(Lc::t("btn_cancel", &LOC)).with_prop(
|
||||
PropsOp::add_classes(class::ButtonColor::link()),
|
||||
),
|
||||
button::ButtonSet::new()
|
||||
.with_button(
|
||||
Button::submit(Lc::t("btn_submit", &LOC)).with_style(
|
||||
button::ButtonStyle::Solid(Intent::Primary),
|
||||
),
|
||||
)
|
||||
.with_button(
|
||||
Button::reset(Lc::t("btn_reset", &LOC)).with_style(
|
||||
button::ButtonStyle::Outline(Intent::Secondary),
|
||||
),
|
||||
)
|
||||
.with_button(
|
||||
Button::plain(Lc::t("btn_cancel", &LOC))
|
||||
.with_style(button::ButtonStyle::Link),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
@ -395,20 +399,20 @@ fn form_lists() -> Form {
|
|||
form
|
||||
// Campo oculto (form::Hidden).
|
||||
.with_child(form::Hidden::field("origin", "form-lists"))
|
||||
// Botones de acción.
|
||||
// Botonera de acciones.
|
||||
.with_child(
|
||||
Button::submit(Lc::t("btn_submit", &LOC)).with_prop(PropsOp::add_classes(
|
||||
class::ButtonColor::solid(ThemeColor::Primary),
|
||||
)),
|
||||
)
|
||||
.with_child(
|
||||
Button::reset(Lc::t("btn_reset", &LOC)).with_prop(PropsOp::add_classes(
|
||||
class::ButtonColor::outline(ThemeColor::Secondary),
|
||||
)),
|
||||
)
|
||||
.with_child(
|
||||
Button::plain(Lc::t("btn_cancel", &LOC))
|
||||
.with_prop(PropsOp::add_classes(class::ButtonColor::link())),
|
||||
button::ButtonSet::new()
|
||||
.with_button(
|
||||
Button::submit(Lc::t("btn_submit", &LOC))
|
||||
.with_style(button::ButtonStyle::Solid(Intent::Primary)),
|
||||
)
|
||||
.with_button(
|
||||
Button::reset(Lc::t("btn_reset", &LOC))
|
||||
.with_style(button::ButtonStyle::Outline(Intent::Secondary)),
|
||||
)
|
||||
.with_button(
|
||||
Button::plain(Lc::t("btn_cancel", &LOC)).with_style(button::ButtonStyle::Link),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,3 +75,5 @@ help_rating = From 1 (very poor) to 10 (excellent).
|
|||
btn_submit = Submit
|
||||
btn_reset = Reset
|
||||
btn_cancel = Cancel
|
||||
btn_ok = Ok
|
||||
btn_delete = Delete record
|
||||
|
|
|
|||
|
|
@ -75,3 +75,5 @@ help_rating = De 1 (muy malo) a 10 (excelente).
|
|||
btn_submit = Enviar
|
||||
btn_reset = Restablecer
|
||||
btn_cancel = Cancelar
|
||||
btn_ok = Aceptar
|
||||
btn_delete = Eliminar registro
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue