-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
- Loading branch information
1 parent
ab7ca3d
commit 1eeaa5a
Showing
5 changed files
with
18 additions
and
29 deletions.
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const info = 'ℹ️'; | ||
export const success = '✅'; | ||
export const warning = '⚠️'; | ||
export const error = '❌️'; |
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 |
---|---|---|
@@ -1,8 +1 @@ | ||
const logSymbols = { | ||
info: 'ℹ️', | ||
success: '✅', | ||
warning: '⚠️', | ||
error: '❌️', | ||
}; | ||
|
||
export default logSymbols; | ||
export * as default from './browser-symbols.js'; |
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 |
---|---|---|
@@ -1,20 +1 @@ | ||
import {blue, green, yellow, red} from 'yoctocolors'; | ||
import isUnicodeSupported from 'is-unicode-supported'; | ||
|
||
const main = { | ||
info: blue('ℹ'), | ||
success: green('✔'), | ||
warning: yellow('⚠'), | ||
error: red('✖'), | ||
}; | ||
|
||
const fallback = { | ||
info: blue('i'), | ||
success: green('√'), | ||
warning: yellow('‼'), | ||
error: red('×'), | ||
}; | ||
|
||
const logSymbols = isUnicodeSupported() ? main : fallback; | ||
|
||
export default logSymbols; | ||
export * as default from './symbols.js'; |
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 @@ | ||
import {blue, green, yellow, red} from 'yoctocolors'; | ||
import isUnicodeSupported from 'is-unicode-supported'; | ||
|
||
const _isUnicodeSupported = isUnicodeSupported(); | ||
|
||
export const info = blue(_isUnicodeSupported ? 'ℹ' : 'i'); | ||
export const success = green(_isUnicodeSupported ? '✔' : '√'); | ||
export const warning = yellow(_isUnicodeSupported ? '⚠' : '‼'); | ||
export const error = red(_isUnicodeSupported ? '✖️' : '×'); |