mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-05 17:15:35 +00:00
theming search resuts
This commit is contained in:
parent
0826aa1003
commit
c451a2f28b
@ -15,6 +15,7 @@ import MagnifyingGlassIcon from '@heroicons/react/24/outline/MagnifyingGlassIcon
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { LatLng, LatLngBounds, marker } from 'leaflet'
|
import { LatLng, LatLngBounds, marker } from 'leaflet'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
|
import SVG from 'react-inlinesvg'
|
||||||
import { useMap, useMapEvents } from 'react-leaflet'
|
import { useMap, useMapEvents } from 'react-leaflet'
|
||||||
import { useLocation, useNavigate } from 'react-router-dom'
|
import { useLocation, useNavigate } from 'react-router-dom'
|
||||||
|
|
||||||
@ -183,10 +184,19 @@ export const SearchControl = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className='tw-flex tw-flex-row'>
|
<div className='tw-flex tw-flex-row'>
|
||||||
<img
|
{item.layer?.menuIcon ? (
|
||||||
src={item.layer?.menuIcon}
|
<SVG
|
||||||
className='tw-text-current tw-w-5 tw-mr-2 tw-mt-0'
|
src={item.layer.menuIcon}
|
||||||
/>
|
className='tw-text-current tw-w-5 tw-mr-2 tw-mt-0'
|
||||||
|
preProcessor={(code: string): string => {
|
||||||
|
code = code.replace(/fill=".*?"/g, 'fill="currentColor"')
|
||||||
|
code = code.replace(/stroke=".*?"/g, 'stroke="currentColor"')
|
||||||
|
return code
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className='tw-w-5' />
|
||||||
|
)}
|
||||||
<div>
|
<div>
|
||||||
<div className='tw-text-sm tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap tw-max-w-[17rem]'>
|
<div className='tw-text-sm tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap tw-max-w-[17rem]'>
|
||||||
{item.name}
|
{item.name}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user