pub struct ResizableSplitProps {
pub direction: SplitDirection,
pub class: TextProp,
pub handle_class: TextProp,
pub percentages: Option<RwSignal<Vec<f64>>>,
pub children: ChildrenFragment,
}
Expand description
Props for the ResizableSplit
component.
A resizable split component. Children will be put into a grid with columns or rows, depending on the direction. The number of children determines the number of splits.
§Example:
use leptos_resize::ResizableSplit;
#[component]
fn MyComponent() -> impl IntoView {
view! {
<ResizableSplit>
<div>"First"</div>
<div>"Second"</div>
<div>"Third"</div>
</ResizableSplit>
}
}
§Required Props
- children:
ChildrenFragment
§Optional Props
- direction:
impl Into<SplitDirection>
- The direction of the split.
- class:
impl Into<TextProp>
- The class property for the underlying grid.
- handle_class:
impl Into<TextProp>
- The class property for the resize handle.
- percentages:
RwSignal<Vec<f64>>
- The percentages of the splits. Will update on resize.
Fields§
§direction: SplitDirection
The direction of the split.
class: TextProp
The class property for the underlying grid.
handle_class: TextProp
The class property for the resize handle.
percentages: Option<RwSignal<Vec<f64>>>
The percentages of the splits. Will update on resize.
children: ChildrenFragment
Implementations§
Source§impl ResizableSplitProps
impl ResizableSplitProps
Sourcepub fn builder() -> ResizableSplitPropsBuilder<((), (), (), (), ())>
pub fn builder() -> ResizableSplitPropsBuilder<((), (), (), (), ())>
Create a builder for building ResizableSplitProps
.
On the builder, call .direction(...)
(optional), .class(...)
(optional), .handle_class(...)
(optional), .percentages(...)
(optional), .children(...)
to set the values of the fields.
Finally, call .build()
to create the instance of ResizableSplitProps
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResizableSplitProps
impl !RefUnwindSafe for ResizableSplitProps
impl Send for ResizableSplitProps
impl !Sync for ResizableSplitProps
impl Unpin for ResizableSplitProps
impl !UnwindSafe for ResizableSplitProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.