From 7fa53ea961aab2062697214c76431f74c65909e6 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 29 Jul 2020 16:38:59 -0400 Subject: [PATCH] Link directly to example code and flesh out pagination component description --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2a53681..aa565a1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ These components are used in production in [Glow][glow] and [Charm][charm]. A spinner, useful for indicating that some kind an operation is happening. There are a couple default ones, but you can also pass your own ”frames.” -* [Example](https://github.com/charmbracelet/tea/tree/master/examples/spinner) +* [Example code](https://github.com/charmbracelet/tea/tree/master/examples/spinner/main.go) ## Text Input @@ -27,15 +27,16 @@ A text input field, akin to an `` in HTML. Supports unicode, pasting, in-place scrolling when the value exceeds the width of the element and the common, and many customization options. -An example of the text field - -* [Example, one field](https://github.com/charmbracelet/tea/tree/master/examples/textinput) -* [Example, many fields](https://github.com/charmbracelet/tea/tree/master/examples/textinput) +* [Example code, one field](https://github.com/charmbracelet/tea/tree/master/examples/textinput/main.go) +* [Example code, many fields](https://github.com/charmbracelet/tea/tree/master/examples/textinput/main.go) ## Paginator A component for handling pagination logic and optionally drawing pagination UI. +Supports "dot-style" pagination (similar to what you might see on iOS) and +numeric page numbering, but you could also just use this component for the +logic and visualize pagination however you like. This component is used in [Glow][glow] to browse documents and [Charm][charm] to browse SSH keys. @@ -47,7 +48,7 @@ A viewport for vertically scrolling content. Optionally includes standard pager keybindings and mouse wheel support. A high performance mode is available for applications which make use of the alterate screen buffer. -* [Example](https://github.com/charmbracelet/tea/tree/master/examples/pager) +* [Example code](https://github.com/charmbracelet/tea/tree/master/examples/pager/main.go) This compoent is well complimented with [Reflow][reflow] for ANSI-aware indenting and text wrapping.