-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(showcase): showcase tabs widget
- Loading branch information
Bulkan Evcimen
committed
Jan 23, 2024
1 parent
7441bd8
commit 8b69e46
Showing
7 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ pub mod line_gauge; | |
pub mod list; | ||
pub mod paragraph; | ||
pub mod table; | ||
pub mod tabs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use ratatui::{prelude::*, widgets::*}; | ||
|
||
pub fn render(frame: &mut Frame) { | ||
let tabs = Tabs::new(vec!["TODO", "IN PROGRESS", "DONE"]) | ||
.block(Block::default().title("Project").borders(Borders::ALL)) | ||
.style(Style::default().white()) | ||
.highlight_style(Style::default().underlined().bold().yellow()) | ||
.select(1) | ||
.divider(symbols::DOT) | ||
.padding(" ", " "); | ||
|
||
frame.render_widget(tabs, frame.size()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# A VHS tape. See https://github.com/charmbracelet/vhs | ||
Output "../../src/content/docs/showcase/widgets/tabs.gif" | ||
Set Theme "Aardvark Blue" | ||
Set Width 600 | ||
Set Height 260 | ||
Type "cargo run -- -w tabs" Enter | ||
Sleep 5s | ||
Screenshot "../../src/content/docs/showcase/widgets/tabs.png" | ||
Sleep 1s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.