diff options
Diffstat (limited to 'src/types/element_name.rs')
| -rw-r--r-- | src/types/element_name.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/types/element_name.rs b/src/types/element_name.rs index c824fc5..8f8ab7e 100644 --- a/src/types/element_name.rs +++ b/src/types/element_name.rs @@ -1,7 +1,8 @@ use serde::{Deserialize, Serialize}; use super::rendered_element::{ - Action, RenderedElement, button, column, container, image, row, svg, text, + Action, RenderedElement, button, column, container, grid, image, row, svg, + text, }; use crate::Error; @@ -14,10 +15,11 @@ pub enum ElementName { Container, Row, Column, + Grid, } impl ElementName { - pub const ALL: &'static [Self; 7] = &[ + pub const ALL: &'static [Self; 8] = &[ Self::Text(String::new()), Self::Button(String::new()), Self::Svg(String::new()), @@ -25,6 +27,7 @@ impl ElementName { Self::Container, Self::Row, Self::Column, + Self::Grid, ]; pub fn handle_action( @@ -40,6 +43,7 @@ impl ElementName { Self::Container => container(None), Self::Row => row(vec![]), Self::Column => column(vec![]), + Self::Grid => grid(vec![]), }; match action { Action::Stop | Action::Drop => Ok(None), @@ -79,6 +83,7 @@ impl std::fmt::Display for ElementName { Self::Container => "Container", Self::Row => "Row", Self::Column => "Column", + Self::Grid => "Grid", } ) } |
