Skip to content

Commit

Permalink
Merge pull request #2159 from bungoboingo/fix/text-editor-style
Browse files Browse the repository at this point in the history
[Fix] Add ability to change style of `TextEditor`
  • Loading branch information
hecrj authored Dec 7, 2023
2 parents fc285d3 + 07b0aed commit eaaea41
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
Expand Down

0 comments on commit eaaea41

Please sign in to comment.