Add dashboard action colors and admin help translations

This commit is contained in:
Codex Agent
2026-01-23 13:14:33 +01:00
parent 233a2b224c
commit c234b1a1cc
6 changed files with 31 additions and 14 deletions

View File

@@ -4,6 +4,7 @@ import { HelpCircle } from 'lucide-react';
import { XStack } from '@tamagui/stacks';
import { SizableText as Text } from '@tamagui/text';
import { Pressable } from '@tamagui/react-native-web-lite';
import { useTranslation } from 'react-i18next';
import { adminPath } from '../../constants';
import { useAdminTheme } from '../theme';
@@ -13,14 +14,16 @@ type ContextHelpLinkProps = {
label?: string;
};
export function ContextHelpLink({ slug, label = 'Help' }: ContextHelpLinkProps) {
export function ContextHelpLink({ slug, label }: ContextHelpLinkProps) {
const navigate = useNavigate();
const { t } = useTranslation('common');
const { border, primary, surfaceMuted, textStrong } = useAdminTheme();
const resolvedLabel = label ?? t('common.help', 'Help');
return (
<Pressable
onPress={() => navigate(adminPath(`/mobile/help/${encodeURIComponent(slug)}`))}
aria-label={label}
aria-label={resolvedLabel}
>
<XStack
alignItems="center"
@@ -34,7 +37,7 @@ export function ContextHelpLink({ slug, label = 'Help' }: ContextHelpLinkProps)
>
<HelpCircle size={14} color={primary} />
<Text fontSize="$xs" fontWeight="700" color={textStrong}>
{label}
{resolvedLabel}
</Text>
</XStack>
</Pressable>