Enum patternfly_yew::State
source · pub enum State {
None,
Danger,
Default,
Info,
Success,
Warning,
Disabled,
}Variants§
Implementations§
source§impl State
impl State
sourcepub fn as_var(&self, weight: usize) -> Option<String>
pub fn as_var(&self, weight: usize) -> Option<String>
Examples found in repository?
src/icon.rs (line 108)
106 107 108 109 110 111 112 113 114 115 116 117
pub fn with_state_weight(&self, state: State, weight: usize) -> Html {
let style = state
.as_var(weight)
.map(|v| format!("color: var({});", v))
.unwrap_or_default();
html! {
<span style={style}>
{ self.as_html() }
</span>
}
}Auto Trait Implementations§
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.