mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
theming search resuts
This commit is contained in:
parent
a84a2eeb3f
commit
9f26666abf
@ -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) && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user