pub struct StatisticProps {
pub title: Option<Element>,
pub value: Option<f64>,
pub value_text: Option<String>,
pub precision: Option<u8>,
pub prefix: Option<Element>,
pub suffix: Option<Element>,
pub value_style: Option<String>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Props for the Statistic component (MVP subset).
Fields§
§title: Option<Element>Optional title shown above the value.
value: Option<f64>Numeric value to display.
value_text: Option<String>Optional preformatted value text. When provided, this takes
precedence over value.
precision: Option<u8>Optional decimal precision applied to value.
prefix: Option<Element>Optional prefix element rendered before the value.
suffix: Option<Element>Optional suffix element rendered after the value.
value_style: Option<String>Optional inline style for the value span (e.g. color).
class: Option<String>Extra class on the root element.
style: Option<String>Inline style on the root element.
Implementations§
Source§impl StatisticProps
impl StatisticProps
Sourcepub fn builder() -> StatisticPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> StatisticPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building StatisticProps.
On the builder, call .title(...)(optional), .value(...)(optional), .value_text(...)(optional), .precision(...)(optional), .prefix(...)(optional), .suffix(...)(optional), .value_style(...)(optional), .class(...)(optional), .style(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of StatisticProps.
Trait Implementations§
Source§impl Clone for StatisticProps
impl Clone for StatisticProps
Source§fn clone(&self) -> StatisticProps
fn clone(&self) -> StatisticProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more