shadcn primitives and logos keyed: dialog, sheet, pagination, carousel, breadcrumb, theme toggles
These are the strings a user meets everywhere, mostly sr-only: the dialog and
sheet close buttons, pagination labels, carousel arrows, the breadcrumb ellipsis
and both colour-mode toggles. nav aria-label='pagination' became a real key too —
a screen reader announces it, so it is user-facing.
Logo alt text keeps the product name and translates only around it
('Logótipo Officer'). Arrow-button insets became logical (-start-12/-end-12).
The three 'useX must be used within <Y>' Errors are deliberately untouched:
never-translate, per the doc's list.
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
import { useTranslation } from '@/components/locales';
|
||||
|
||||
type SvgLogoProps = {
|
||||
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||
};
|
||||
|
||||
export function OfficerIconLogo({ size = 'xl' }: SvgLogoProps) {
|
||||
const { t } = useTranslation();
|
||||
const config = sizeConfig[size];
|
||||
|
||||
return (
|
||||
<img
|
||||
src="/officer-logo.svg"
|
||||
alt="Officer Icon"
|
||||
style={{ width: config.width, height: 'auto' }}
|
||||
/>
|
||||
);
|
||||
return <img src="/officer-logo.svg" alt={t('logo.icon')} style={{ width: config.width, height: 'auto' }} />;
|
||||
}
|
||||
|
||||
const sizeConfig = {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { useTranslation } from '@/components/locales';
|
||||
|
||||
type SvgLogoProps = {
|
||||
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
||||
square?: boolean;
|
||||
@@ -12,27 +14,17 @@ export function OfficerSvgLogo({ size = 'xl', square = false }: SvgLogoProps) {
|
||||
}
|
||||
|
||||
export function OfficerSvgLogoRegular({ size = 'xl' }: SvgLogoProps) {
|
||||
const { t } = useTranslation();
|
||||
const config = sizeConfig.regular[size];
|
||||
|
||||
return (
|
||||
<img
|
||||
src="/officer-logo.svg"
|
||||
alt="Officer Logo"
|
||||
style={{ width: config.width, height: 'auto' }}
|
||||
/>
|
||||
);
|
||||
return <img src="/officer-logo.svg" alt={t('logo.logo')} style={{ width: config.width, height: 'auto' }} />;
|
||||
}
|
||||
|
||||
export function OfficerSvgLogoSquare({ size = 'xl' }: SvgLogoProps) {
|
||||
const { t } = useTranslation();
|
||||
const config = sizeConfig.square[size];
|
||||
|
||||
return (
|
||||
<img
|
||||
src="/officer-logo.svg"
|
||||
alt="Officer Logo"
|
||||
style={{ width: config.width, height: 'auto' }}
|
||||
/>
|
||||
);
|
||||
return <img src="/officer-logo.svg" alt={t('logo.logo')} style={{ width: config.width, height: 'auto' }} />;
|
||||
}
|
||||
|
||||
const sizeConfig = {
|
||||
|
||||
Reference in New Issue
Block a user