dioxus_tw_components/components/atoms/placeholder/
props.rs

1use crate::attributes::*;
2use dioxus::prelude::*;
3use dioxus_tw_components_macro::UiComp;
4
5#[derive(Default, Clone, PartialEq, Props, UiComp)]
6pub struct PlaceholderProps {
7    #[props(extends = div, extends = GlobalAttributes)]
8    attributes: Vec<Attribute>,
9
10    #[props(optional, default)]
11    pub color: ReadOnlySignal<Color>,
12    #[props(optional, default)]
13    pub animation: ReadOnlySignal<Animation>,
14}
15
16#[component]
17pub fn Placeholder(mut props: PlaceholderProps) -> Element {
18    props.update_class_attribute();
19
20    rsx! {
21        div { ..props.attributes }
22    }
23}