pub struct ColorPickerProps {
pub type: String,
pub value: Option<String>,
pub on_value_change: Option<EventHandler<String>>,
pub oninput: Option<EventHandler<FormEvent>>,
pub onchange: Option<EventHandler<FormEvent>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for ColorPicker.
Fields§
§type: StringThe native input type. Defaults to color.
value: Option<String>The color. #rgb, #rrggbb, rgb(), and hsl() values are converted to the #rrggbb
form a color input needs; other values are passed through unchanged.
on_value_change: Option<EventHandler<String>>Called with the picked color as lowercase #rrggbb.
oninput: Option<EventHandler<FormEvent>>Fires on every edit.
onchange: Option<EventHandler<FormEvent>>Fires when the value is committed.
class: Option<String>Extra classes appended after the Lumen class.
attributes: Vec<Attribute>Any other <input> or global attribute, such as id, name, or aria_label.
Implementations§
Source§impl ColorPickerProps
impl ColorPickerProps
Sourcepub fn builder() -> ColorPickerPropsBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> ColorPickerPropsBuilder<((), (), (), (), (), (), ())>
Create a builder for building ColorPickerProps.
On the builder, call .r#type(...)(optional), .value(...)(optional), .on_value_change(...)(optional), .oninput(...)(optional), .onchange(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ColorPickerProps.
Trait Implementations§
Source§impl Clone for ColorPickerProps
impl Clone for ColorPickerProps
Source§impl PartialEq for ColorPickerProps
impl PartialEq for ColorPickerProps
Source§impl Properties for ColorPickerPropswhere
Self: Clone,
impl Properties for ColorPickerPropswhere
Self: Clone,
Source§type Builder = ColorPickerPropsBuilder<((), (), (), (), (), (), ())>
type Builder = ColorPickerPropsBuilder<((), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for ColorPickerProps
Auto Trait Implementations§
impl !RefUnwindSafe for ColorPickerProps
impl !Send for ColorPickerProps
impl !Sync for ColorPickerProps
impl !UnwindSafe for ColorPickerProps
impl Forget for ColorPickerProps
impl Freeze for ColorPickerPropswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: Freeze,
PhantomData<Option<ExternalListenerCallback<Event<FormData>, ()>>>: Freeze,
PhantomData<Attribute>: Freeze,
impl Move for ColorPickerProps
impl Unpin for ColorPickerPropswhere
*const u8 is !null: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut(String)>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
Box<dyn FnMut(Event<FormData>)>: Unpin,
&'static str: Unpin,
Rc<RefCell<dyn FnMut(Event<dyn Any>)>>: Unpin,
Rc<dyn AnyValue>: Unpin,
impl UnsafeUnpin for ColorPickerPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<Event<FormData>, ()>>>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 more