diff --git a/crates/story/src/fixtures/color-wheel.svg b/crates/story/src/fixtures/color-wheel.svg deleted file mode 100644 index 8d632d1d..00000000 --- a/crates/story/src/fixtures/color-wheel.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - diff --git a/crates/story/src/fixtures/google.svg b/crates/story/src/fixtures/google.svg deleted file mode 100644 index 24c555d6..00000000 --- a/crates/story/src/fixtures/google.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/crates/story/src/image_story.rs b/crates/story/src/image_story.rs index 40d005e9..8c0d7b95 100644 --- a/crates/story/src/image_story.rs +++ b/crates/story/src/image_story.rs @@ -1,7 +1,7 @@ use crate::section; use gpui::{ - img, App, AppContext, Context, Entity, FocusHandle, Focusable, IntoElement, ParentElement as _, - Render, Styled, Window, + App, AppContext, Context, Entity, FocusHandle, Focusable, IntoElement, ParentElement as _, + Render, Styled, Window, img, }; use gpui_component::{dock::PanelControl, v_flex}; @@ -47,20 +47,9 @@ impl Focusable for ImageStory { impl Render for ImageStory { fn render(&mut self, _: &mut Window, _: &mut Context) -> impl IntoElement { - // The svg file are from Assets - // See: crates/story/src/assets.rs#L21 - v_flex() - .gap_4() - .size_full() - .child(section("SVG 160px").child(img("src/fixtures/google.svg").size_40().flex_grow())) - .child( - section("SVG 80px") - .child(img("src/fixtures/color-wheel.svg").size_20().flex_grow()), - ) - .child( - section("SVG from img 40px").child( - img("https://pub.lbkrs.com/files/202503/vEnnmgUM6bo362ya/sdk.svg").h_24(), - ), - ) + v_flex().gap_4().size_full().child( + section("SVG from URL") + .child(img("https://pub.lbkrs.com/files/202503/vEnnmgUM6bo362ya/sdk.svg").h_24()), + ) } }