Trait patternfly_yew::core::WithBreakpointExt

source ·
pub trait WithBreakpointExt<T>: Sized
where T: PartialEq,
{ // Required method fn on(self, breakpoint: Breakpoint) -> WithBreakpoint<T>; // Provided methods fn all(self) -> WithBreakpoint<T> { ... } fn sm(self) -> WithBreakpoint<T> { ... } fn md(self) -> WithBreakpoint<T> { ... } fn lg(self) -> WithBreakpoint<T> { ... } fn xl(self) -> WithBreakpoint<T> { ... } fn xxl(self) -> WithBreakpoint<T> { ... } }
Expand description

Helps creating WithBreakpoint instances.

§Example

The following example populates the cols attribute of a GridItem. I requires a number of columns to span, which can be specified for the different breakpoints.

use yew::prelude::*;
use patternfly_yew::prelude::*;

#[function_component(Example)]
fn example() -> Html {
  html!(
    <Grid>
        <GridItem cols={[4.all(), 8.lg()]}>{"cell"}</GridItem>
    </Grid>
  )
}

Required Methods§

source

fn on(self, breakpoint: Breakpoint) -> WithBreakpoint<T>

Provided Methods§

source

fn all(self) -> WithBreakpoint<T>

source

fn sm(self) -> WithBreakpoint<T>

source

fn md(self) -> WithBreakpoint<T>

source

fn lg(self) -> WithBreakpoint<T>

source

fn xl(self) -> WithBreakpoint<T>

source

fn xxl(self) -> WithBreakpoint<T>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> WithBreakpointExt<T> for T
where T: PartialEq,