MCPcopy Create free account
hub / github.com/editablejs/editable / getColor

Function getColor

apps/docs/src/components/mdx/sandpack/console.tsx:20–28  ·  view source on GitHub ↗
(message: SandpackMessageConsoleMethods)

Source from the content-addressed store, hash-verified

18}
19
20const getColor = (message: SandpackMessageConsoleMethods): string => {
21 if (message === 'warn') {
22 return 'text-yellow-50'
23 } else if (message === 'error') {
24 return 'text-red-40'
25 } else {
26 return 'text-secondary dark:text-secondary-dark'
27 }
28}
29
30// based on https://github.com/tmpfs/format-util/blob/0e62d430efb0a1c51448709abd3e2406c14d8401/format.js#L1
31// based on https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions

Callers 1

SandpackConsoleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…