This commit is contained in:
Antonio Scandurra
2023-10-17 13:32:49 +02:00
parent 488d08b43c
commit c04171abf6
16 changed files with 251 additions and 302 deletions
+10 -6
View File
@@ -88,11 +88,11 @@ impl<S: 'static + Send + Sync> Input<S> {
.border()
.border_color(border_color_default)
.fill(background_color_default)
.hover()
.border_color(border_color_hover)
// .active()
// .border_color(border_color_active)
.fill(background_color_active)
.hover(|h| {
h.border_color(border_color_hover)
.fill(background_color_active)
})
// .active(|a| .border_color(border_color_active))
.flex()
.items_center()
.child(
@@ -128,7 +128,11 @@ mod stories {
}
}
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<ViewState = S> {
Story::container(cx)
.child(Story::title_for::<_, Input<S>>(cx))
.child(Story::label(cx, "Default"))
+1 -1
View File
@@ -2,7 +2,7 @@ use gpui3::{div, Div};
use crate::prelude::*;
pub trait Stack: StyleHelpers {
pub trait Stack: Styled + Sized {
/// Horizontally stacks elements.
fn h_stack(self) -> Self {
self.flex().flex_row().items_center()