2023-04-13 12:51:25 -05:00
|
|
|
use crate::void_app::{Element, Props};
|
|
|
|
|
2023-04-16 21:46:10 -05:00
|
|
|
use super::user_prefs::UserPrefs;
|
|
|
|
|
2023-04-13 12:51:25 -05:00
|
|
|
#[derive(PartialEq, Props)]
|
|
|
|
pub struct PoemRequest {
|
|
|
|
pub slug: String,
|
2023-04-16 21:46:10 -05:00
|
|
|
pub user_prefs: UserPrefs,
|
2023-04-13 12:51:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(PartialEq, Props)]
|
|
|
|
pub struct TitleProps {
|
|
|
|
pub title: String,
|
|
|
|
pub is_html: bool,
|
2023-04-16 21:46:10 -05:00
|
|
|
pub user_prefs: UserPrefs,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(PartialEq, Props)]
|
|
|
|
pub struct ContentProps {
|
|
|
|
pub content: String,
|
2023-04-13 12:51:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(PartialEq, Props)]
|
|
|
|
pub struct ButtonProps {
|
|
|
|
pub title: String,
|
|
|
|
pub slug: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(PartialEq, Props)]
|
|
|
|
pub struct PoemData {
|
|
|
|
pub title: Option<String>,
|
|
|
|
pub content: Option<String>,
|
|
|
|
pub creation_date: Option<String>,
|
|
|
|
pub slug: Option<String>,
|
|
|
|
pub dark_mode: Option<bool>,
|
|
|
|
}
|
|
|
|
|
2023-04-16 21:46:10 -05:00
|
|
|
// These next three should all just be one prop.
|
2023-04-13 12:51:25 -05:00
|
|
|
#[derive(Props)]
|
|
|
|
pub struct PoemChildren<'a> {
|
|
|
|
pub children: Element<'a>,
|
|
|
|
}
|
2023-04-16 21:46:10 -05:00
|
|
|
|
|
|
|
#[derive(Props)]
|
|
|
|
pub struct PageChildren<'a> {
|
|
|
|
pub children: Element<'a>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Props)]
|
|
|
|
pub struct ContentChildren<'a> {
|
|
|
|
pub children: Element<'a>,
|
|
|
|
}
|