Checkpoint: Compiling
This commit is contained in:
parent
8b972f6d8e
commit
9fb9885931
50 changed files with 139 additions and 146 deletions
|
@ -25,7 +25,7 @@ impl<S: 'static + Send + Sync> Avatar<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
let mut img = img();
|
||||
|
@ -67,7 +67,7 @@ mod stories {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Avatar<S>>(cx))
|
||||
.child(Story::label(cx, "Default"))
|
||||
|
|
|
@ -154,7 +154,7 @@ impl<S: 'static + Send + Sync> Button<S> {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
let icon_color = self.icon_color();
|
||||
|
||||
let mut button = h_stack()
|
||||
|
@ -211,7 +211,7 @@ impl<S: 'static + Send + Sync> ButtonGroup<S> {
|
|||
}
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let mut el = h_stack().text_size(ui_size(cx, 1.));
|
||||
|
||||
for button in &mut self.buttons {
|
||||
|
@ -250,7 +250,7 @@ mod stories {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
let states = InteractionState::iter();
|
||||
|
||||
Story::container(cx)
|
||||
|
|
|
@ -30,7 +30,7 @@ impl<S: 'static + Send + Sync> Details<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
v_stack()
|
||||
|
@ -70,7 +70,7 @@ mod stories {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Details<S>>(cx))
|
||||
.child(Story::label(cx, "Default"))
|
||||
|
|
|
@ -176,7 +176,7 @@ impl<S: 'static + Send + Sync> IconElement<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let fill = self.color.color(cx);
|
||||
let svg_size = match self.size {
|
||||
IconSize::Small => ui_size(cx, 12. / 14.),
|
||||
|
@ -218,7 +218,7 @@ mod stories {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
let icons = Icon::iter();
|
||||
|
||||
Story::container(cx)
|
||||
|
|
|
@ -60,7 +60,7 @@ impl<S: 'static + Send + Sync> Input<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
let (input_bg, input_hover_bg, input_active_bg) = match self.variant {
|
||||
|
@ -136,7 +136,7 @@ mod stories {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Input<S>>(cx))
|
||||
.child(Story::label(cx, "Default"))
|
||||
|
|
|
@ -83,7 +83,7 @@ impl<S: 'static + Send + Sync> Label<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
div()
|
||||
.when(self.strikethrough, |this| {
|
||||
this.relative().child(
|
||||
|
@ -135,7 +135,7 @@ impl<S: 'static + Send + Sync> HighlightedLabel<S> {
|
|||
self
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
let highlight_color = theme.text_accent;
|
||||
|
@ -227,7 +227,7 @@ mod stories {
|
|||
&mut self,
|
||||
_view: &mut S,
|
||||
cx: &mut ViewContext<S>,
|
||||
) -> impl Element<ViewState = S> {
|
||||
) -> impl Element<S> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, Label<S>>(cx))
|
||||
.child(Story::label(cx, "Default"))
|
||||
|
|
|
@ -14,7 +14,7 @@ impl<S: 'static + Send + Sync> ToolDivider<S> {
|
|||
}
|
||||
}
|
||||
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
|
||||
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
div().w_px().h_3().bg(theme.border)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue