pub struct EuvTagProps {
pub color: EuvTagColor,
pub variant: EuvTagVariant,
pub text: &'static str,
pub on_click: Option<Rc<dyn Fn(Event)>>,
}Expand description
Props for the euv_tag component.
Defines the strongly-typed interface for a status tag indicator.
Fields§
§color: EuvTagColorThe semantic colour type.
variant: EuvTagVariantThe visual variant (solid or outline).
text: &'static strThe tag text content.
on_click: Option<Rc<dyn Fn(Event)>>Optional click event handler.
Implementations§
Source§impl EuvTagProps
impl EuvTagProps
pub fn get_color(&self) -> EuvTagColor
pub fn get_mut_color(&mut self) -> &mut EuvTagColor
pub fn set_color(&mut self, val: EuvTagColor) -> &mut Self
pub fn get_variant(&self) -> EuvTagVariant
pub fn get_mut_variant(&mut self) -> &mut EuvTagVariant
pub fn set_variant(&mut self, val: EuvTagVariant) -> &mut Self
pub fn get_text(&self) -> &'static str
pub fn get_mut_text(&mut self) -> &mut &'static str
pub fn set_text(&mut self, val: &'static str) -> &mut Self
pub fn get_on_click(&self) -> Rc<dyn Fn(Event)>
pub fn try_get_on_click(&self) -> &Option<Rc<dyn Fn(Event)>>
pub fn get_mut_on_click(&mut self) -> &mut Option<Rc<dyn Fn(Event)>>
pub fn set_on_click(&mut self, val: Option<Rc<dyn Fn(Event)>>) -> &mut Self
Source§impl EuvTagProps
impl EuvTagProps
pub fn new( color: EuvTagColor, variant: EuvTagVariant, text: &'static str, on_click: Option<Rc<dyn Fn(Event)>>, ) -> Self
Trait Implementations§
Source§impl Clone for EuvTagProps
impl Clone for EuvTagProps
Source§fn clone(&self) -> EuvTagProps
fn clone(&self) -> EuvTagProps
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EuvTagProps
impl Debug for EuvTagProps
Source§impl Default for EuvTagProps
impl Default for EuvTagProps
Source§fn default() -> EuvTagProps
fn default() -> EuvTagProps
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for EuvTagProps
impl !Send for EuvTagProps
impl !Sync for EuvTagProps
impl !UnwindSafe for EuvTagProps
impl Freeze for EuvTagProps
impl Unpin for EuvTagProps
impl UnsafeUnpin for EuvTagProps
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