From 18ac78917f9a7479d631e07d358ffe1a1289445c Mon Sep 17 00:00:00 2001
From: Josh McKinney <joshka@users.noreply.github.com>
Date: Tue, 6 Aug 2024 06:56:46 -0700
Subject: [PATCH] chore(deps): use ratatui::crossterm instead of importing
 crossterm (#16)

Alternative to: https://github.com/shuoli84/tui-menu/pull/15
---
 Cargo.toml               |  1 -
 examples/basic.rs        | 15 +++++++++------
 examples/nested_group.rs | 10 +++++-----
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 8517ecf..c8b9232 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,4 +14,3 @@ ratatui = "0.27.0"
 
 [dev-dependencies]
 color-eyre = "0.6.3"
-crossterm = "0.27.0"
diff --git a/examples/basic.rs b/examples/basic.rs
index d5d2162..07634ef 100644
--- a/examples/basic.rs
+++ b/examples/basic.rs
@@ -1,11 +1,14 @@
 use color_eyre::config::HookBuilder;
-use crossterm::{
-    event::{self, Event, KeyCode},
-    execute,
-    terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
-};
 use ratatui::{
-    prelude::*,
+    crossterm::{
+        event::{self, Event, KeyCode},
+        execute,
+        terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
+    },
+    prelude::{
+        Backend, Buffer, Constraint, CrosstermBackend, Layout, Rect, StatefulWidget, Stylize,
+        Terminal, Widget,
+    },
     widgets::{Block, Paragraph},
 };
 use std::io::{self, stdout, Stdout};
diff --git a/examples/nested_group.rs b/examples/nested_group.rs
index 39e594d..f6a980d 100644
--- a/examples/nested_group.rs
+++ b/examples/nested_group.rs
@@ -1,10 +1,10 @@
 use color_eyre::config::HookBuilder;
-use crossterm::{
-    event::{self, Event, KeyCode},
-    execute,
-    terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
-};
 use ratatui::{
+    crossterm::{
+        event::{self, Event, KeyCode},
+        execute,
+        terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
+    },
     prelude::*,
     widgets::{Block, Paragraph},
 };