Skip to content

Commit

Permalink
Corrected example in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBloom committed Feb 7, 2024
1 parent f7f5c00 commit 26054a0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
//! is as easy as possible. To get started, create a struct that will hold your app's logic,
//! implement the [`TerminalApp`] trait for it, and run the [`run_tui`] function with an instance
//! of your app.
//! ```rust
//! ```no_run
//! use ratatui::{prelude::*, widgets::*};
//! use webatui::prelude::*;
//!
//! #[derive(PartialEq, Clone)]
//! struct MyApp {
//! title: String,
//! }
Expand All @@ -24,10 +28,10 @@
//! type Message = ();
//!
//! // This simple app does not update
//! fn update(&mut self, _: TermContext<'_, Self>, _: Self::Message) -> bool { }
//! fn update(&mut self, _: TermContext<'_, Self>, _: Self::Message) -> bool { false }
//!
//! fn render(&self, area: Rect, frame: &mut Frame<'_>) {
//! let para = Paragraph::new(&self.title);
//! let para = Paragraph::new(self.title.as_str());
//! frame.render_widget(para, area);
//! }
//! }
Expand Down

0 comments on commit 26054a0

Please sign in to comment.