Merge pull request #2159 from bungoboingo/fix/text-editor-style

[Fix] Add ability to change style of `TextEditor`
This commit is contained in:
Héctor Ramón 2023-12-07 02:48:18 +01:00 committed by GitHub
commit eaaea414b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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`].