♻️ (locale): Sustituye Attr<Lc> por Lc::none()

This commit is contained in:
Manuel Cillero 2026-08-17 03:16:49 +02:00
parent c3ff8a6ff8
commit 213aa18b12
17 changed files with 275 additions and 146 deletions

View file

@ -37,9 +37,9 @@ pub struct Number {
/// Devuelve el valor inicial del campo.
value: Attr<u64>,
/// Devuelve la etiqueta del campo.
label: Attr<Lc>,
label: Lc,
/// Devuelve el texto de ayuda del campo.
help_text: Attr<Lc>,
help_text: Lc,
/// Devuelve el valor mínimo permitido.
min: Attr<u64>,
/// Devuelve el valor máximo permitido.
@ -151,17 +151,17 @@ impl Number {
self
}
/// Establece o elimina la etiqueta visible del campo (basta pasar `None` para quitarla).
/// Establece la etiqueta visible del campo (usa [`Lc::none()`] para quitarla).
#[builder_fn]
pub fn with_label(mut self, label: impl Into<Option<Lc>>) -> Self {
self.label.alter_opt(label.into());
pub fn with_label(mut self, label: Lc) -> Self {
self.label = label;
self
}
/// Establece o elimina el texto de ayuda del campo (basta pasar `None` para quitarlo).
/// Establece el texto de ayuda del campo (usa [`Lc::none()`] para quitarlo).
#[builder_fn]
pub fn with_help_text(mut self, help_text: impl Into<Option<Lc>>) -> Self {
self.help_text.alter_opt(help_text.into());
pub fn with_help_text(mut self, help_text: Lc) -> Self {
self.help_text = help_text;
self
}