euv-ui 0.28.2

Reusable UI component library for the euv framework, providing buttons, cards, modals, inputs, and more.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

impl EuvAvatarSize {
    /// Returns the square edge length in pixels for this size.
    ///
    /// # Returns
    ///
    /// - `i32` - The edge length in pixels: 24 for `Small`, 32 for `Medium`,
    ///   40 for `Large`.
    pub fn px(&self) -> i32 {
        match self {
            EuvAvatarSize::Small => 24,
            EuvAvatarSize::Medium => 32,
            EuvAvatarSize::Large => 40,
        }
    }
}