windjammer_ui/components/generated/
typingindicator.rs

1#![allow(clippy::all)]
2#![allow(noop_method_call)]
3use super::traits::Renderable;
4
5#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
6pub struct TypingIndicator {
7    pub label: String,
8}
9
10impl TypingIndicator {
11    #[inline]
12    pub fn new() -> TypingIndicator {
13        TypingIndicator {
14            label: String::from("AI is typing"),
15        }
16    }
17    #[inline]
18    pub fn label(mut self, label: String) -> TypingIndicator {
19        self.label = label;
20        self
21    }
22}
23
24impl Renderable for TypingIndicator {
25    #[inline]
26    fn render(self) -> String {
27        format!(
28            "<div class='wj-typing-indicator'>
29                <div class='wj-typing-dots'>
30                    <span class='wj-typing-dot'></span>
31                    <span class='wj-typing-dot'></span>
32                    <span class='wj-typing-dot'></span>
33                </div>
34                <span class='wj-typing-label'>{}</span>
35            </div>",
36            self.label
37        )
38    }
39}