use serde::{Deserialize, Serialize};
use crate::layout::FlexDirection;
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
pub struct FlexLayout {
#[serde(default)]
pub direction: FlexDirection,
#[serde(default)]
pub wrap: bool,
#[serde(default)]
pub gap: String,
}
impl FlexLayout {
pub fn new() -> Self {
Self::default()
}
pub fn direction(&self) -> FlexDirection {
self.direction
}
pub fn wrap(&self) -> bool {
self.wrap
}
pub fn gap(&self) -> &str {
&self.gap
}
}