theming search resuts

This commit is contained in:
Anton Tranelis 2025-03-19 17:14:15 +00:00
parent a84a2eeb3f
commit 9f26666abf

View File

@ -170,7 +170,7 @@ export const SearchControl = () => {
{itemsResults.slice(0, 5).map((item) => ( {itemsResults.slice(0, 5).map((item) => (
<div <div
key={item.id} key={item.id}
className='tw-cursor-pointer hover:tw-font-bold' className='tw-cursor-pointer hover:tw-font-bold tw-flex tw-flex-row'
onClick={() => { onClick={() => {
const marker = Object.entries(leafletRefs).find((r) => r[1].item === item)?.[1] const marker = Object.entries(leafletRefs).find((r) => r[1].item === item)?.[1]
.marker .marker
@ -183,11 +183,10 @@ export const SearchControl = () => {
} }
}} }}
> >
<div className='tw-flex tw-flex-row'>
{item.layer?.menuIcon ? ( {item.layer?.menuIcon ? (
<SVG <SVG
src={item.layer.menuIcon} src={item.layer.menuIcon}
className='tw-text-current tw-w-5 tw-mr-2 tw-mt-0' className='tw-text-current tw-mr-2 tw-mt-0 tw-w-5'
preProcessor={(code: string): string => { preProcessor={(code: string): string => {
code = code.replace(/fill=".*?"/g, 'fill="currentColor"') code = code.replace(/fill=".*?"/g, 'fill="currentColor"')
code = code.replace(/stroke=".*?"/g, 'stroke="currentColor"') code = code.replace(/stroke=".*?"/g, 'stroke="currentColor"')
@ -206,7 +205,6 @@ export const SearchControl = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
))} ))}
{Array.from(geoResults).length > 0 && {Array.from(geoResults).length > 0 &&
(itemsResults.length > 0 || tagsResults.length > 0) && ( (itemsResults.length > 0 || tagsResults.length > 0) && (