This repository was archived by the owner on Nov 24, 2023. It is now read-only.
File tree 3 files changed +6
-10
lines changed
3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1
-
2
1
use leptos:: * ;
3
2
4
3
#[ component]
5
- pub fn CmpxEditor (
6
- content : ReadSignal < String > ,
7
- set_content : WriteSignal < String >
8
- ) -> impl IntoView {
9
-
4
+ pub fn CmpxEditor ( content : ReadSignal < String > , set_content : WriteSignal < String > ) -> impl IntoView {
10
5
view ! {
11
6
<textarea
12
7
class="code-editor"
13
8
type ="text"
14
9
on: input=move |ev| {
15
- set_content. set( event_target_value( & ev) ) ;
10
+ set_content. set( event_target_value( & ev) ) ;
16
11
}
12
+
17
13
prop: value=content. get( )
18
14
rows=40
19
15
style="margin: 10px;"
Original file line number Diff line number Diff line change
1
+ use super :: cmpx_editor:: CmpxEditor ;
1
2
use crate :: editor:: analyze:: parse;
2
3
use leptonic:: prelude:: Button ;
3
4
use leptonic:: prelude:: Col ;
@@ -13,7 +14,6 @@ use leptonic::prelude::ThemeToggle;
13
14
use leptos:: leptos_dom:: helpers:: IntervalHandle ;
14
15
use leptos:: * ;
15
16
use web_time:: Duration ;
16
- use super :: cmpx_editor:: CmpxEditor ;
17
17
18
18
#[ component]
19
19
pub fn FileEditor ( ) -> impl IntoView {
@@ -80,7 +80,7 @@ pub fn FileEditor() -> impl IntoView {
80
80
<Row >
81
81
// editor region
82
82
<Col md=6 sm=1 xs=1 >
83
- <CmpxEditor content=content set_content=set_content/>
83
+ <CmpxEditor content=content set_content=set_content/>
84
84
</Col >
85
85
// editor region end
86
86
Original file line number Diff line number Diff line change 1
1
mod analyze;
2
- mod fileedit;
3
2
mod cmpx_editor;
3
+ mod fileedit;
4
4
5
5
use fileedit:: FileEditor ;
6
6
use leptos:: * ;
You can’t perform that action at this time.
0 commit comments