pub struct BridgeDropZoneProps<A: Clone + PartialEq + 'static, B: Clone + PartialEq + 'static> {
pub id: Option<ZoneId>,
pub label: Option<String>,
pub accepts_a: Option<Callback<A, bool>>,
pub accepts_b: Option<Callback<B, bool>>,
pub on_drop_a: EventHandler<DropOutcome<A>>,
pub on_drop_b: EventHandler<DropOutcome<B>>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Properties for the BridgeDropZone component.
Fields§
§id: Option<ZoneId>Stable identity for this zone, valid in both worlds. Auto-generated if omitted.
label: Option<String>Human label for screen-reader announcements, used by both worlds.
accepts_a: Option<Callback<A, bool>>Return false to reject a payload from the first world.
accepts_b: Option<Callback<B, bool>>Return false to reject a payload from the second world.
on_drop_a: EventHandler<DropOutcome<A>>Fired when a drag from the first world drops here.
on_drop_b: EventHandler<DropOutcome<B>>Fired when a drag from the second world drops here.
attributes: Vec<Attribute>§children: ElementImplementations§
Source§impl<A: Clone + PartialEq + 'static, B: Clone + PartialEq + 'static> BridgeDropZoneProps<A, B>
impl<A: Clone + PartialEq + 'static, B: Clone + PartialEq + 'static> BridgeDropZoneProps<A, B>
Sourcepub fn builder() -> BridgeDropZonePropsBuilder<((), (), (), (), (), (), (), ()), A, B>
pub fn builder() -> BridgeDropZonePropsBuilder<((), (), (), (), (), (), (), ()), A, B>
Create a builder for building BridgeDropZoneProps.
On the builder, call .id(...)(optional), .label(...)(optional), .accepts_a(...)(optional), .accepts_b(...)(optional), .on_drop_a(...), .on_drop_b(...), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of BridgeDropZoneProps.