♻️ (pagetop): with_prop() acepta impl Into<PropsOp>
`FlexItem`, `Margin` y `Padding` se pasan directamente gracias a `From` hacia `PropsOp`, sin `PropsOp::flex_item()`/`margin()`/`padding()` ni `.into()` explícito. Revisadas todas las llamadas en el código para simplificarlas.
This commit is contained in:
parent
50e4b42fe4
commit
3c3ffc91e6
49 changed files with 141 additions and 165 deletions
|
|
@ -122,7 +122,7 @@ impl Badge {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ impl Block {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ impl Brand {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ impl Breadcrumb {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ impl Crumb {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML del elemento.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ impl Button {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ impl Container {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ impl Dialog {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ impl Dropdown {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ impl Item {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ impl Field {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ impl Checkbox {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ impl Form {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ impl Fieldset {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ impl Field {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ impl Number {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ impl Field {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ impl Range {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ impl Field {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ impl Textarea {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ impl Image {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ impl Messages {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ impl Nav {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ impl Item {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ impl Navbar {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS, atributos HTML o valores extra del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ impl Pager {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML del componente.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ impl Cell {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML de la celda.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ impl Column {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML de la columna.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ impl Table {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML de la tabla.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ impl SortLink {
|
|||
|
||||
/// Modifica los atributos HTML del enlace. Es el punto de extensión para añadir atributos de
|
||||
/// interactividad sin que `Table` necesite conocerlos.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ impl Row {
|
|||
}
|
||||
|
||||
/// Modifica identificador, clases CSS o atributos HTML de la fila.
|
||||
pub fn with_prop(mut self, op: PropsOp) -> Self {
|
||||
pub fn with_prop(mut self, op: impl Into<PropsOp>) -> Self {
|
||||
self.props.alter_prop(op);
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue