Refine insight highlighted text
This commit is contained in:
parent
a4a02c95de
commit
006fcb0325
@ -66,14 +66,13 @@ const renderHighlightText = (
|
||||
truncate = true,
|
||||
) =>
|
||||
<span className={clsx(
|
||||
'px-1.5 my-[-2px] rounded-md',
|
||||
truncate
|
||||
? 'max-w-full truncate inline-block align-middle pt-[1px] pb-[2px]'
|
||||
: 'relative top-[1px] pb-[1px]',
|
||||
'px-1.5 pb-[1px] rounded-md',
|
||||
truncate && 'max-w-full inline-block',
|
||||
truncate && 'text-ellipsis whitespace-nowrap overflow-x-clip',
|
||||
color === 'blue' && 'text-blue-600 bg-blue-100/60',
|
||||
color === 'blue' && 'dark:text-blue-400 dark:bg-blue-900/50',
|
||||
color === 'yellow' && 'text-amber-700 bg-amber-100/50',
|
||||
color === 'yellow' && 'dark:text-amber-400 dark:bg-amber-900/40',
|
||||
color === 'yellow' && 'dark:text-amber-400 dark:bg-amber-900/35',
|
||||
)}>
|
||||
{text}
|
||||
</span>;
|
||||
|
||||
@ -31,7 +31,7 @@ export default function Container({
|
||||
case 'blue': return [
|
||||
'text-blue-900 dark:text-blue-300',
|
||||
'bg-blue-50/50 dark:bg-blue-950/30',
|
||||
'border-blue-200 dark:border-blue-600/30',
|
||||
'border-blue-200 dark:border-blue-600/20',
|
||||
];
|
||||
case 'red': return [
|
||||
'text-red-600 dark:text-red-500/90',
|
||||
|
||||
@ -2,10 +2,10 @@ import {
|
||||
TEMPLATE_REPO_OWNER,
|
||||
TEMPLATE_REPO_NAME,
|
||||
TEMPLATE_REPO_BRANCH,
|
||||
IS_DEVELOPMENT,
|
||||
} from '@/app/config';
|
||||
|
||||
const DEFAULT_BRANCH = 'main';
|
||||
const CACHE_GITHUB_REQUESTS = false;
|
||||
const GITHUB_API_ERROR = 'API rate limit exceeded';
|
||||
|
||||
interface RepoParams {
|
||||
@ -17,7 +17,7 @@ interface RepoParams {
|
||||
|
||||
const fetchGitHub = async (
|
||||
url: string,
|
||||
cacheRequest = CACHE_GITHUB_REQUESTS,
|
||||
cacheRequest = IS_DEVELOPMENT,
|
||||
) => {
|
||||
const data = await fetch(
|
||||
url,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user