Skip to content

Commit aedbd16

Browse files
committed
Add preview image
1 parent e923c47 commit aedbd16

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

tui-qrcode/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ TUI QR Code is a library for rendering QR codes in a terminal using the [Ratatui
1212

1313
[GitHub Repository] · [API Docs] · [Examples] · [Changelog] · [Contributing]
1414

15+
![Demo](https://vhs.charm.sh/vhs-nUpcmCP1igCcGoJ5iio07.gif)
16+
1517
## Usage
1618

1719
Add qrcode and tui-qrcode to your Cargo.toml. You can disable the default features of qrcode as

tui-qrcode/examples/qrcode.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use qrcode::QrCode;
2-
use ratatui::{crossterm::event, style::Stylize, DefaultTerminal, Frame};
2+
use ratatui::{crossterm::event, DefaultTerminal, Frame};
33
use tui_qrcode::{Colors, QrCodeWidget};
44

55
fn main() -> color_eyre::Result<()> {
@@ -21,6 +21,6 @@ fn run(mut terminal: DefaultTerminal) -> color_eyre::Result<()> {
2121

2222
fn render(frame: &mut Frame) {
2323
let qr_code = QrCode::new("https://ratatui.rs").expect("failed to create QR code");
24-
let widget = QrCodeWidget::new(qr_code).colors(Colors::Inverted).blue();
24+
let widget = QrCodeWidget::new(qr_code).colors(Colors::Inverted);
2525
frame.render_widget(widget, frame.area());
2626
}

tui-qrcode/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
//!
99
//! [GitHub Repository] · [API Docs] · [Examples] · [Changelog] · [Contributing]
1010
//!
11+
//! ![Demo](https://vhs.charm.sh/vhs-nUpcmCP1igCcGoJ5iio07.gif)
12+
//!
1113
//! # Usage
1214
//!
1315
//! Add qrcode and tui-qrcode to your Cargo.toml. You can disable the default features of qrcode as

0 commit comments

Comments
 (0)