Pull the settings from the global state
This commit is contained in:
parent
61e09ff532
commit
a1f7a97ff5
2 changed files with 82 additions and 6 deletions
|
@ -17,7 +17,7 @@ use log::LevelFilter;
|
|||
use simplelog::SimpleLogger;
|
||||
use story_selector::ComponentStory;
|
||||
use ui::prelude::*;
|
||||
use ui::{themed, FakeSettings};
|
||||
use ui::{themed, with_settings, FakeSettings};
|
||||
|
||||
use crate::assets::Assets;
|
||||
use crate::story_selector::StorySelector;
|
||||
|
@ -100,7 +100,7 @@ impl StoryWrapper {
|
|||
}
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<ViewState = Self> {
|
||||
cx.with_global(self.settings.clone(), |cx| {
|
||||
with_settings(self.settings.clone(), cx, |cx| {
|
||||
themed(self.theme.clone(), cx, |cx| {
|
||||
div()
|
||||
.flex()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue