Enum patternfly_yew::Size
source · pub enum Size {
XSmall,
Small,
Medium,
Large,
XLarge,
XXLarge,
XXXLarge,
XXXXLarge,
}Variants§
Implementations§
source§impl Size
impl Size
sourcepub fn as_class(&self) -> &'static str
pub fn as_class(&self) -> &'static str
Examples found in repository?
src/empty.rs (line 42)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
fn view(&self, ctx: &Context<Self>) -> Html {
let mut classes = Classes::from("pf-c-empty-state");
if ctx.props().full_height {
classes.push("pf-m-full-height");
}
if let Some(size) = ctx.props().size {
classes.push(size.as_class());
}
return html! {
<div class={classes}>
<div class="pf-c-empty-state__content">
{ self.render_icon(ctx) }
<Title size={ self.title_size(ctx) }>{&ctx.props().title}</Title>
<div class="pf-c-empty-state__body">
{ for ctx.props().children.iter() }
</div>
{ self.render_primary_action(ctx) }
{ self.render_secondary_actions(ctx) }
</div>
</div>
};
}Trait Implementations§
source§impl Ord for Size
impl Ord for Size
source§impl PartialOrd<Size> for Size
impl PartialOrd<Size> for Size
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Size
impl Eq for Size
impl StructuralEq for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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.