pub struct CustomButtonProps {
pub is_disabled: Signal<bool>,
pub on_press: Option<BoxedPressEventCallback>,
pub class: Signal<String>,
pub children: Children,
}Expand description
Props for the CustomButton component.
A generic element behaving as a button when no native control fits.
The custom-element path of the upstream useButton: a role="button"
div with the press wiring and the disabled state expressed through
aria-disabled and the tab order.
§Required Props
- children:
Children
§Optional Props
- is_disabled:
impl Into<Signal<bool>>- Whether the button is disabled.
- on_press:
BoxedPressEventCallback- Handler that is called when the press is released over the target.
- class:
impl Into<Signal<String>>- Classes for the root element.
Fields§
§is_disabled: Signal<bool>Whether the button is disabled.
on_press: Option<BoxedPressEventCallback>Handler that is called when the press is released over the target.
class: Signal<String>Classes for the root element.
children: ChildrenImplementations§
Source§impl CustomButtonProps
impl CustomButtonProps
Sourcepub fn builder() -> CustomButtonPropsBuilder<((), (), (), ())>
pub fn builder() -> CustomButtonPropsBuilder<((), (), (), ())>
Create a builder for building CustomButtonProps.
On the builder, call .is_disabled(...)(optional), .on_press(...)(optional), .class(...)(optional), .children(...) to set the values of the fields.
Finally, call .build() to create the instance of CustomButtonProps.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CustomButtonProps
impl !Send for CustomButtonProps
impl !Sync for CustomButtonProps
impl !UnwindSafe for CustomButtonProps
impl Freeze for CustomButtonProps
impl Unpin for CustomButtonProps
impl UnsafeUnpin for CustomButtonProps
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<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§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.