mirror of
https://github.com/charmbracelet/gum
synced 2024-05-19 14:46:42 +02:00
docs(examples): fix demos
This commit is contained in:
parent
c96aa6f0e5
commit
a4f01b5354
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
go install github.com/charmbracelet/gum
|
||||
|
||||
echo "Hello, there! Welcome to $(gum style --foreground 212 'Gum')."
|
||||
|
||||
NAME=$(gum input --placeholder "What is your name?")
|
||||
|
@ -14,13 +12,15 @@ echo "Wait a moment, while I think of my favorite color..."
|
|||
|
||||
gum spin --title "Thinking..." -- sleep 3
|
||||
|
||||
echo "I like $(gum style --padding "0 1" --background $COLOR $COLOR), too. In fact, it's my $(gum style --padding "0 1" --background $COLOR 'favorite color!')"
|
||||
echo "I like $(gum style --padding "0 1" --background "$COLOR" "$COLOR"), too. In fact, it's my $(gum style --padding "0 1" --background $COLOR 'favorite color!')"
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "Seems like we have a lot in common, $(gum style --foreground 212 "$NAME")."
|
||||
|
||||
sleep 1
|
||||
sleep 3
|
||||
|
||||
clear
|
||||
|
||||
echo "What's your favorite Gum flavor?"
|
||||
|
||||
|
@ -29,10 +29,26 @@ Grape
|
|||
Lime
|
||||
Orange" | gum filter)
|
||||
|
||||
echo "One sec, while I finish my drink."
|
||||
sleep 1
|
||||
|
||||
clear
|
||||
|
||||
echo "Do you like $(gum style --foreground "#04B575" "Bubble Gum?")"
|
||||
|
||||
CHOICE=$(gum choose "Yes" "No" "It's complicated")
|
||||
|
||||
if [ "$CHOICE" == "Yes" ]; then
|
||||
echo "I thought so, $(gum style --foreground "#04B575" "Bubble Gum") is the best."
|
||||
else
|
||||
echo "I'm sorry to hear that."
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
gum spin --title "Chewing some $GUM bubble gum..." -- sleep 5
|
||||
|
||||
gum style --width 50 --padding "1 5" --margin "1 2" --border double --border-foreground 212 \
|
||||
clear
|
||||
|
||||
gum style --width 50 --padding "1 5" --margin "0 2 1 2" --border double --border-foreground 212 \
|
||||
"Well, it was nice meeting you, $(gum style --foreground 212 "$NAME"). Hope to see you soon!"\
|
||||
"Don't forget to chew some $(gum style --foreground 212 $GUM) bubble gum."
|
||||
|
|
Loading…
Reference in a new issue