Skip to content

Commit

Permalink
Added the ability to change the style of a TextEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
bungoboingo committed Dec 6, 2023
1 parent fc285d3 commit 07b0aed
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 07b0aed

Please sign in to comment.