Add placeholder git panel (#21894)
Adds a simple git placeholder panel for us to iterate from. Also includes a number of assets from the git prototyping branch that we will use. Note: This panel is staff flagged for now. Release Notes: - N/A
This commit is contained in:
@@ -30,20 +30,20 @@ pub trait ComponentPreview: IntoElement {
|
||||
ExampleLabelSide::default()
|
||||
}
|
||||
|
||||
fn examples(_cx: &WindowContext) -> Vec<ComponentExampleGroup<Self>>;
|
||||
fn examples(_cx: &mut WindowContext) -> Vec<ComponentExampleGroup<Self>>;
|
||||
|
||||
fn custom_example(_cx: &WindowContext) -> impl Into<Option<AnyElement>> {
|
||||
None::<AnyElement>
|
||||
}
|
||||
|
||||
fn component_previews(cx: &WindowContext) -> Vec<AnyElement> {
|
||||
fn component_previews(cx: &mut WindowContext) -> Vec<AnyElement> {
|
||||
Self::examples(cx)
|
||||
.into_iter()
|
||||
.map(|example| Self::render_example_group(example))
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn render_component_previews(cx: &WindowContext) -> AnyElement {
|
||||
fn render_component_previews(cx: &mut WindowContext) -> AnyElement {
|
||||
let title = Self::title();
|
||||
let (source, title) = title
|
||||
.rsplit_once("::")
|
||||
|
||||
Reference in New Issue
Block a user