Move My Position button inside search bar
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7c09a62170
commit
e650cf2cae
|
|
@ -2197,14 +2197,6 @@ export default function MapView({
|
|||
onPlaceTourWire={handleOpenCreate}
|
||||
/>
|
||||
<div className="sw-search__side" aria-label="Search actions">
|
||||
<button
|
||||
type="button"
|
||||
className="sw-search__iconBtn"
|
||||
title="My Position"
|
||||
onClick={handleFlyToMe}
|
||||
>
|
||||
<i className="fa-solid fa-location-crosshairs"></i>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="sw-search__iconBtn"
|
||||
|
|
|
|||
|
|
@ -308,6 +308,18 @@ export default function SmartSearchBar({
|
|||
</svg>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{onMySpot && (
|
||||
<button
|
||||
type="button"
|
||||
className="sw-search__mySpotBtn"
|
||||
title={t('map.myPosition')}
|
||||
onClick={onMySpot}
|
||||
aria-label={t('map.myPosition')}
|
||||
>
|
||||
<i className="fa-solid fa-location-crosshairs"></i>
|
||||
</button>
|
||||
)}
|
||||
</form>
|
||||
|
||||
{showList && (
|
||||
|
|
|
|||
|
|
@ -173,7 +173,29 @@ body[data-theme="light"] {
|
|||
|
||||
/* My Position button inside search bar */
|
||||
.sw-search__mySpotBtn {
|
||||
border: 0;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
background: var(--sw-chip-bg, rgba(255,255,255,0.08));
|
||||
color: var(--sw-text, rgba(255,255,255,0.92));
|
||||
padding: 6px 10px;
|
||||
border-radius: 8px;
|
||||
font-size: 16px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.15s ease;
|
||||
flex-shrink: 0;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.sw-search__mySpotBtn:hover {
|
||||
background: var(--sw-hover, rgba(255,255,255,0.15));
|
||||
color: #38bdf8;
|
||||
}
|
||||
|
||||
.sw-search__mySpotBtn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.sw-search__iconBtn.is-active {
|
||||
|
|
|
|||
Loading…
Reference in New Issue