windjammer_ui/components/generated/
typingindicator.rs

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