Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Oct 17, 2024
1 parent 83ff2a5 commit 69a7778
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions widget/src/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ pub enum Status {
}

/// The style of a button.
///
///
/// If not specified with [`Button::style`]
/// the theme will provide the style.
#[derive(Debug, Clone, Copy, PartialEq)]
Expand Down Expand Up @@ -508,10 +508,10 @@ impl Default for Style {
}

/// The theme catalog of a [`Button`].
///
///
/// All themes that can be used with [`Button`]
/// must implement this trait.
///
///
/// # Example
/// ```no_run
/// #[derive(Debug, Default)]
Expand All @@ -521,18 +521,18 @@ impl Default for Style {
/// Secondary,
/// Danger
/// }
///
///
/// impl Catalog for MyTheme {
/// type Class<'a> = ButtonClass;
///
/// fn default<'a>() -> Self::Class<'a> {
/// ButtonClass::default()
/// }
///
///
///
/// fn style(&self, class: &Self::Class<'_>, status: Status) -> Style {
/// let mut style = Style::default();
///
///
/// match class {
/// ButtonClass::Primary => {
/// style.background = Some(Background::Color(Color::from_rgb(0.529, 0.808, 0.921)));
Expand All @@ -544,12 +544,12 @@ impl Default for Style {
/// style.background = Some(Background::Color(Color::from_rgb(0.941, 0.502, 0.502)));
/// },
/// }
///
///
/// style
/// }
/// }
/// ```
///
///
/// Although, in order to use [`Button::style`]
/// with `MyTheme`, [`Catalog::Class`] must implement
/// `From<StyleFn<'_, MyTheme>>`.
Expand Down

0 comments on commit 69a7778

Please sign in to comment.