Files
oak-gpui/crates/ui2/src/elements/tool_divider.rs
T
2023-10-26 10:08:39 +02:00

23 lines
474 B
Rust

use std::marker::PhantomData;
use crate::prelude::*;
#[derive(Element)]
pub struct ToolDivider<S: 'static + Send + Sync> {
state_type: PhantomData<S>,
}
impl<S: 'static + Send + Sync> ToolDivider<S> {
pub fn new() -> Self {
Self {
state_type: PhantomData,
}
}
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)
}
}