woocraft 0.4.5

GPUI components lib for Woocraft design system.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Pre-configured animation helpers for common UI animations.
//!
//! Provides ready-to-use animations (e.g., spinner rotation) utilizing theme
//! duration settings.

use gpui::{Animation, linear};

use crate::base::theme::duration;

/// Creates a continuous spinning animation using the theme spinner duration.
///
/// Produces a repeating 360-degree rotation animation suitable for loading
/// indicators.
pub fn spinner_animation() -> Animation {
  Animation::new(duration::SPINNER)
    .repeat()
    .with_easing(linear)
}