diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs index 0323de7032..45edb1a73d 100644 --- a/crates/ui2/src/elements/input.rs +++ b/crates/ui2/src/elements/input.rs @@ -13,17 +13,17 @@ pub enum InputVariant { #[derive(Element)] pub struct Input { state_type: PhantomData, - placeholder: &'static str, + placeholder: SharedString, value: String, state: InteractionState, variant: InputVariant, } impl Input { - pub fn new(placeholder: &'static str) -> Self { + pub fn new(placeholder: impl Into) -> Self { Self { state_type: PhantomData, - placeholder, + placeholder: placeholder.into(), value: "".to_string(), state: InteractionState::default(), variant: InputVariant::default(),