mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +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,27 +183,25 @@ 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-mr-2 tw-mt-0 tw-w-5'
|
||||||
className='tw-text-current tw-w-5 tw-mr-2 tw-mt-0'
|
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"')
|
return code
|
||||||
return code
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
) : (
|
||||||
) : (
|
<div className='tw-w-5' />
|
||||||
<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}
|
</div>
|
||||||
</div>
|
<div className='tw-text-xs tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap tw-max-w-[17rem]'>
|
||||||
<div className='tw-text-xs tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap tw-max-w-[17rem]'>
|
{item.text}
|
||||||
{item.text}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user