Added the ability to change the style of a TextEditor

This commit is contained in:
Bingus 2023-12-06 14:52:53 -08:00
parent fc285d3e46
commit 07b0aed5d3
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170

View file

@ -128,6 +128,15 @@ where
highlighter_format: to_format,
}
}
/// Sets the style of the [`TextEditor`].
pub fn style(
mut self,
style: impl Into<<Renderer::Theme as StyleSheet>::Style>,
) -> Self {
self.style = style.into();
self
}
}
/// The content of a [`TextEditor`].