pub enum Orientation {
    Left,
    Right,
    Top,
    Bottom,
}

Variants§

§

Left

§

Right

§

Top

§

Bottom

Implementations§

Examples found in repository?
src/popover/mod.rs (line 186)
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
    fn view(&self, ctx: &Context<Self>) -> Html {
        let mut classes = Classes::from("pf-c-popover");

        classes.extend(ctx.props().orientation.as_classes());

        let style = if ctx.props().hidden {
            "display: none;".to_string()
        } else {
            ctx.props().styles.to_string()
        };

        let onclose = ctx.link().callback(|_| PopoverPopupMsg::Close);

        return html! {
            <div
                ref={&ctx.props().r#ref}
                style={style}
                class={classes}
                role="dialog"
                aria-model="true"
            >
                <div class="pf-c-popover__arrow"></div>
                <div class="pf-c-popover__content">

                    <Button
                        variant={Variant::Plain}
                        icon={Icon::Times}
                        aria_label="Close"
                        onclick={onclose}
                    />

                    if let Some(header) = &ctx.props().header {
                        <h1 class="pf-c-title pf-m-md">
                            { header.clone() }
                        </h1>
                    }

                    <div class="pf-c-popover__body">
                        { for ctx.props().children.iter() }
                    </div>

                    if let Some(footer) = &ctx.props().footer {
                        <footer class="pf-c-popover__footer">
                            { footer.clone() }
                        </footer>
                    }

                </div>
            </div>
        };
    }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert self to a value of a Properties struct.
Convert self to a value of a Properties struct.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more