pub struct Config {
pub button_size: Option<String>,
pub button_variant: Option<String>,
pub card_padding: Option<String>,
pub input_size: Option<String>,
pub spacing_unit: Option<u8>,
pub border_radius: Option<String>,
pub enable_transitions: bool,
}Expand description
Global component configuration
Fields§
Default button size (“sm”, “md”, “lg”, “icon”)
Default button variant (“primary”, “secondary”, “ghost”, “destructive”, “link”)
card_padding: Option<String>Default card padding
input_size: Option<String>Default input size
spacing_unit: Option<u8>Default spacing scale unit
border_radius: Option<String>Default border radius
enable_transitions: boolWhether to apply transitions globally
Implementations§
Source§impl Config
impl Config
Set default button size
Set default button variant
Sourcepub fn with_card_padding(self, padding: impl Into<String>) -> Self
pub fn with_card_padding(self, padding: impl Into<String>) -> Self
Set default card padding
Sourcepub fn with_input_size(self, size: impl Into<String>) -> Self
pub fn with_input_size(self, size: impl Into<String>) -> Self
Set default input size
Sourcepub fn with_spacing_unit(self, unit: u8) -> Self
pub fn with_spacing_unit(self, unit: u8) -> Self
Set default spacing unit
Sourcepub fn with_border_radius(self, radius: impl Into<String>) -> Self
pub fn with_border_radius(self, radius: impl Into<String>) -> Self
Set default border radius
Sourcepub fn with_transitions(self, enabled: bool) -> Self
pub fn with_transitions(self, enabled: bool) -> Self
Enable/disable transitions globally
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.