|
1 | 1 | use apps::{ |
2 | | - Example, Show, copy_to_clipboard::CopyToClipboardExample, custom_input::CustomExample, |
3 | | - editor::JsonEditorExample, search::SearchExample, |
4 | | - toggle_buttons::ToggleButtonsCustomisationDemo, wrapping::WrappingExample, |
| 2 | + Show, copy_to_clipboard::CopyToClipboardExample, custom_input::CustomInputExample, |
| 3 | + editor::JsonEditorExample, search::SearchExample, toggle_buttons::ToggleButtonsExample, |
| 4 | + wrapping::WrappingExample, |
5 | 5 | }; |
6 | 6 | use serde_json::json; |
7 | 7 |
|
8 | | -use crate::apps::default_expand::DefaultExpandExample; |
| 8 | +use crate::apps::{Example, default_expand::DefaultExpandExample}; |
9 | 9 |
|
10 | 10 | mod apps; |
11 | 11 |
|
@@ -35,28 +35,13 @@ impl Default for DemoApp { |
35 | 35 |
|
36 | 36 | Self { |
37 | 37 | examples: vec![ |
38 | | - Box::new(Example::new("Null", json!(null))), |
39 | | - Box::new(Example::new("Bool", json!(true))), |
40 | | - Box::new(Example::new("Number (int)", json!(42))), |
41 | | - Box::new(Example::new("Number (neg int)", json!(-273))), |
42 | | - Box::new(Example::new("Number (float)", json!(13.37))), |
43 | | - Box::new(Example::new("String", json!("This is a string!"))), |
44 | | - Box::new(Example::new("Array", json!([1, 2, 3]))), |
45 | | - Box::new(Example::new( |
46 | | - "Nested Arrays", |
47 | | - json!([1, [2, 3, 4], [5, 6, [7], 8], [9, [[], 10]]]), |
48 | | - )), |
49 | | - Box::new(Example::new( |
50 | | - "Object", |
51 | | - json!({"foo": 123, "bar": "Hello world!", "baz": null}), |
52 | | - )), |
53 | | - Box::new(Example::new("Complex Object", complex_object.clone())), |
54 | | - Box::new(CustomExample::new()), |
| 38 | + Box::new(Example::new("Object", complex_object.clone())), |
| 39 | + Box::new(DefaultExpandExample::new(complex_object.clone())), |
55 | 40 | Box::new(SearchExample::new(complex_object.clone())), |
| 41 | + Box::new(CustomInputExample::new()), |
56 | 42 | Box::new(CopyToClipboardExample::new(complex_object.clone())), |
57 | 43 | Box::new(JsonEditorExample::new(complex_object.clone())), |
58 | | - Box::new(DefaultExpandExample::new(complex_object.clone())), |
59 | | - Box::new(ToggleButtonsCustomisationDemo::new(complex_object)), |
| 44 | + Box::new(ToggleButtonsExample::new(complex_object)), |
60 | 45 | Box::new(WrappingExample::new(long_strings_object)), |
61 | 46 | ], |
62 | 47 | open_example_idx: None, |
|
0 commit comments