mirror of
https://github.com/ratatui-org/ratatui
synced 2025-02-16 22:18:51 +00:00
feat(buffer): add a method to build a Style
out of an existing Cell
This commit is contained in:
parent
62495c3bd1
commit
41142732ec
1 changed files with 7 additions and 0 deletions
|
@ -51,6 +51,13 @@ impl Cell {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn style(&self) -> Style {
|
||||
Style::default()
|
||||
.fg(self.fg)
|
||||
.bg(self.bg)
|
||||
.add_modifier(self.modifier)
|
||||
}
|
||||
|
||||
pub fn reset(&mut self) {
|
||||
self.symbol.clear();
|
||||
self.symbol.push(' ');
|
||||
|
|
Loading…
Add table
Reference in a new issue