(message: SandpackMessageConsoleMethods)
| 18 | } |
| 19 | |
| 20 | const 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…