zu/divider/
text_align.rs

1// Copyright (c) 2024 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
2// Use of this source is governed by Lesser General Public License
3// that can be found in the LICENSE file.
4
5use crate::styles::CssClass;
6
7/// Set the text-align on the component.
8#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
9pub enum TextAlign {
10    #[default]
11    Center,
12    Left,
13    Right,
14}
15
16impl CssClass for TextAlign {
17    fn css_class(&self) -> &'static str {
18        match self {
19            Self::Center => "",
20            Self::Left => "ZuDivider-textAlignLeft",
21            Self::Right => "ZuDivider-textAlignRight",
22        }
23    }
24}