--- import '@pagefind/default-ui/css/ui.css'; import Icon from '../user-components/Icon.astro'; import project from 'virtual:starlight/project-context'; import type { Props } from '../props'; const { labels } = Astro.props; const pagefindTranslations = { placeholder: labels['search.label'], ...Object.fromEntries( Object.entries(labels) .filter(([key]) => key.startsWith('pagefind.')) .map(([key, value]) => [key.replace('pagefind.', ''), value]) ), }; --- { /* The span is `aria-hidden` because it is not shown on small screens. Instead, the icon label is used for accessibility purposes. */ } {labels['search.label']} { /* TODO: Make the layout of this button flexible to accommodate different word lengths. Currently hard-coded for English: “Cancel” */ } {labels['search.cancelLabel']} { import.meta.env.DEV ? ( {labels['search.devWarning']} ) : ( ) }
{labels['search.devWarning']}