Enum patternfly_yew::Icon
source · pub enum Icon {
Show 33 variants
AngleDown,
AngleLeft,
AngleDoubleLeft,
AngleRight,
AngleDoubleRight,
AngleUp,
ArrowDown,
ArrowLeft,
ArrowRight,
ArrowUp,
Bell,
CaretDown,
CaretUp,
Check,
CheckCircle,
Copy,
Cubes,
EllipsisH,
EllipsisV,
ExclamationCircle,
ExclamationTriangle,
ExternalLinkAlt,
InfoCircle,
Minus,
MinusCircleIcon,
Pause,
Play,
PlusCircleIcon,
QuestionCircle,
Times,
Th,
Help,
Pending,
}Variants§
AngleDown
AngleLeft
AngleDoubleLeft
AngleRight
AngleDoubleRight
AngleUp
ArrowDown
ArrowLeft
ArrowRight
ArrowUp
Bell
CaretDown
CaretUp
Check
CheckCircle
Copy
Cubes
EllipsisH
EllipsisV
ExclamationCircle
ExclamationTriangle
ExternalLinkAlt
InfoCircle
Minus
MinusCircleIcon
Pause
Play
PlusCircleIcon
QuestionCircle
Times
Th
Help
Pending
Implementations§
source§impl Icon
impl Icon
sourcepub fn as_html(&self) -> Html
pub fn as_html(&self) -> Html
Examples found in repository?
More examples
src/icon.rs (line 114)
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
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>
}
}
pub fn with_classes(&self, mut classes: Classes) -> Html {
self.extend(&mut classes);
html! {
<i class={classes} aria-hidden="true"></i>
}
}
}
fn fas(name: &str) -> [&str; 2] {
["fas", name]
}
fn pf(name: &str) -> [&str; 2] {
["pficon", name]
}
impl From<Icon> for VNode {
fn from(icon: Icon) -> Self {
icon.as_html()
}
}
impl IntoPropValue<Html> for Icon {
fn into_prop_value(self) -> Html {
self.as_html()
}
}
impl IntoPropValue<Option<Html>> for Icon {
fn into_prop_value(self) -> Option<Html> {
Some(self.as_html())
}pub fn with_state(&self, state: State) -> Html
sourcepub fn with_state_weight(&self, state: State, weight: usize) -> Html
pub fn with_state_weight(&self, state: State, weight: usize) -> Html
sourcepub fn with_classes(&self, classes: Classes) -> Html
pub fn with_classes(&self, classes: Classes) -> Html
Examples found in repository?
More examples
Trait Implementations§
source§impl IntoPropValue<Option<VNode>> for Icon
impl IntoPropValue<Option<VNode>> for Icon
source§fn into_prop_value(self) -> Option<Html>
fn into_prop_value(self) -> Option<Html>
Convert
self to a value of a Properties struct.source§impl IntoPropValue<VNode> for Icon
impl IntoPropValue<VNode> for Icon
source§fn into_prop_value(self) -> Html
fn into_prop_value(self) -> Html
Convert
self to a value of a Properties struct.impl Copy for Icon
impl Eq for Icon
impl StructuralEq for Icon
impl StructuralPartialEq for Icon
Auto Trait Implementations§
impl RefUnwindSafe for Icon
impl Send for Icon
impl Sync for Icon
impl Unpin for Icon
impl UnwindSafe for Icon
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.