🎨 Review layout composition with Flex components
This commit is contained in:
parent
dfbe807a61
commit
4c026e696b
19 changed files with 658 additions and 674 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue