From d5649b0925077cc35fbc1dd9dc128b2291b66a02 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Sat, 18 Feb 2023 21:12:25 -0800 Subject: [PATCH] Update editor styles --- src-wasm/hello/Cargo.toml | 1 + src-wasm/hello/src/lib.rs | 6 ++--- src-web/App.tsx | 4 ++-- src-web/components/Editor/Editor.css | 16 ++++++++++--- src-web/components/Editor/Editor.tsx | 5 ++-- src-web/hooks/useCodemirror.ts | 36 ++++++++++++++++++---------- 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/src-wasm/hello/Cargo.toml b/src-wasm/hello/Cargo.toml index c1b2bf68..7fd6c005 100644 --- a/src-wasm/hello/Cargo.toml +++ b/src-wasm/hello/Cargo.toml @@ -23,6 +23,7 @@ console_error_panic_hook = { version = "0.1.6", optional = true } # compared to the default allocator's ~10K. It is slower than the default # allocator, however. wee_alloc = { version = "0.4.5", optional = true } +wasm-bindgen-futures = "0.4.34" [dev-dependencies] wasm-bindgen-test = "0.3.13" diff --git a/src-wasm/hello/src/lib.rs b/src-wasm/hello/src/lib.rs index 8bad11a5..8ab83c58 100644 --- a/src-wasm/hello/src/lib.rs +++ b/src-wasm/hello/src/lib.rs @@ -1,14 +1,14 @@ -mod utils; - use wasm_bindgen::prelude::*; +mod utils; + // When the `wee_alloc` feature is enabled, use `wee_alloc` as the global allocator. #[cfg(feature = "wee_alloc")] #[global_allocator] static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; #[wasm_bindgen] -extern { +extern "C" { fn alert(s: &str); #[wasm_bindgen(js_namespace = console)] diff --git a/src-web/App.tsx b/src-web/App.tsx index aecb65ae..46551323 100644 --- a/src-web/App.tsx +++ b/src-web/App.tsx @@ -39,7 +39,7 @@ function App() { -
+
- +