Documentation
¶
Index ¶
- Variables
- func BoldText(text string, color HexColor) string
- func BoldUnderlineText(text string, color HexColor) string
- func CreateFrame(text string, maxWidth int) string
- func Cursor(cursorChar string) string
- func DefaultTextWithoutOverridingStyledText(text string) string
- func FadeText(text string) string
- func NewWordwrapWriter(limit int) *wordwrap.WordWrap
- func RenderError(err error) string
- func RenderFooter(text string) string
- func RenderKey(keyName, address string) string
- func RenderPreviousResponse(separator string, question string, highlights []string, answer string) string
- func RenderPrompt(text string, highlights []string, status PromptStatus) string
- func SetBoldColor(text string, color HexColor) string
- func SetBoldUnderlineColor(text string, color HexColor) string
- func SetColor(text string, color HexColor) string
- func StripANSI(text string) string
- func Text(text string, color HexColor) string
- func TextWithoutOverridingStyledText(text string, color HexColor) string
- func WordwrapBytes(b []byte, limit int) []byte
- func WordwrapString(s string, limit int) string
- type HexColor
- type PromptStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HiddenMnemonicText = Text("*Mnemonic has been entered and is now hidden for security purposes.*", Ivory) )
View Source
var ( QuestionMark = Text("? ", Cyan) CorrectMark = Text("✓ ", Green) InformationMark = Text("i ", Cyan) SelectorCursor = Text("> ", Cyan) )
View Source
var ( NoSeparator = "" ArrowSeparator = Text(" > ", Gray) DotsSeparator = Text(" ... ", Gray) )
Functions ¶
func BoldUnderlineText ¶
func CreateFrame ¶
func DefaultTextWithoutOverridingStyledText ¶
DefaultTextWithoutOverridingStyledText is a helper function to apply default styling without overriding existing styles
func NewWordwrapWriter ¶ added in v0.1.0
func RenderError ¶
func RenderFooter ¶
func RenderPreviousResponse ¶
func RenderPrompt ¶
func RenderPrompt(text string, highlights []string, status PromptStatus) string
RenderPrompt highlights phrases in the text if they match any phrase in the highlight list
func SetBoldColor ¶
func SetBoldUnderlineColor ¶
func WordwrapBytes ¶ added in v0.1.0
func WordwrapString ¶ added in v0.1.0
Types ¶
type PromptStatus ¶
type PromptStatus string
const ( Empty PromptStatus = "empty" Checked PromptStatus = "checked" Question PromptStatus = "question" Information PromptStatus = "information" Completed PromptStatus = "completed" )
Click to show internal directories.
Click to hide internal directories.