Skip to content

Commit

Permalink
theme2: Move stories to RPITIT for Render
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz committed Jan 1, 2024
1 parent 6027962 commit 219999c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions crates/theme2/src/styles/stories/color.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use gpui::prelude::*;
use gpui::{div, px, Div, ViewContext};
use gpui::{div, px, ViewContext};
use story::Story;

use crate::{default_color_scales, ColorScaleStep};

pub struct ColorsStory;

impl Render for ColorsStory {
type Element = Div;

fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element {
let color_scales = default_color_scales();

Story::container().child(Story::title("Colors")).child(
Expand Down
6 changes: 2 additions & 4 deletions crates/theme2/src/styles/stories/players.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use gpui::{div, img, px, Div, ParentElement, Render, Styled, ViewContext};
use gpui::{div, img, px, Element, ParentElement, Render, Styled, ViewContext};
use story::Story;

use crate::{ActiveTheme, PlayerColors};

pub struct PlayerStory;

impl Render for PlayerStory {
type Element = Div;

fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element {
Story::container().child(
div()
.flex()
Expand Down

0 comments on commit 219999c

Please sign in to comment.