tea-cli 0.1.0

Interactive and headless Coding CLI for tea-rs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::super::render_output::RenderedLine;
use super::{Component, RenderBlock, RenderContext};

pub(crate) struct Lines {
    lines: Vec<RenderedLine>,
}

impl Lines {
    pub(crate) const fn new(lines: Vec<RenderedLine>) -> Self {
        Self { lines }
    }
}

impl Component for Lines {
    fn render(&self, _ctx: &RenderContext<'_>, _width: u16) -> RenderBlock {
        RenderBlock::from_lines(self.lines.clone())
    }
}