Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: Add emojis #146

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions component/colorable-tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@ func BeginsWith(s, prefix string) bool {
func Green(s string) string {
return aurora.Green(s).String()
}

// PrefixEmoji prefixes a string with an emoji.
func PrefixEmoji(emoji Icon, s string) string {
return aurora.Sprintf("%s %s", string(emoji), s)
}
25 changes: 25 additions & 0 deletions component/emoji.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2022 VMware, Inc. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024

// SPDX-License-Identifier: Apache-2.0

package component

type Icon rune

const (
FloppyDisk Icon = '💾'
Package Icon = '📦'
Delivery Icon = '🚚'
SpeechBalloon Icon = '💬'
Magnifying Icon = '🔎'
Repeat Icon = '🔁'
Antenna Icon = '📡'
Ship Icon = '🚢'
Envelop Icon = '✉'
IncomingEnvelop Icon = '📨'
Canoe Icon = '🛶'
Inbox Icon = '📥'
Question Icon = '❓'
ThumbsUp Icon = '👍'
Exclamation Icon = '❗'
CheckMark Icon = '✅'
)