🎨 Review layout composition with Flex components

This commit is contained in:
Manuel Cillero 2024-03-18 00:00:50 +01:00
parent dfbe807a61
commit 4c026e696b
19 changed files with 658 additions and 674 deletions

View file

@ -1,25 +0,0 @@
use crate::prelude::*;
#[derive(AutoDefault)]
pub struct Fluent(L10n);
impl ComponentTrait for Fluent {
fn new() -> Self {
Fluent::default()
}
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
PrepareMarkup::With(self.0.escaped(cx.langid()))
}
}
impl Fluent {
pub fn with(l10n: L10n) -> Self {
Fluent(l10n)
}
pub fn alter_l10n(&mut self, l10n: L10n) -> &mut Self {
self.0 = l10n;
self
}
}