Skip to content

Commit

Permalink
react/kiez-search-profile: fix search profile alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
sevfurneaux committed Feb 6, 2025
1 parent a1aa1fa commit b8c8488
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
11 changes: 0 additions & 11 deletions meinberlin/assets/scss/components_user_facing/_control-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@
}
}

.control-bar__bottom--projects div:last-child {
text-align: right;
margin-bottom: 1em;
margin-top: 1em;

@media screen and (min-width: $breakpoint-palm) {
margin-bottom: 0;
margin-top: 0;
}
}

.modul-facetingform .facetingform__container .control-bar__checkboxes {
margin-bottom: 1.5em;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@
margin-left: -1.25rem;
}

.save-search-profile {
margin-bottom: 0.9375rem;
text-align: right;

@media screen and (min-width: $breakpoint-palm) {
margin-bottom: 0;
}
}

.save-search-profile__action {
color: $gray-darkest;
line-height: 1.5rem;
Expand Down
38 changes: 23 additions & 15 deletions meinberlin/react/plans/SaveSearchProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,37 @@ export default function SaveSearchProfile ({
}) {
if (!isAuthenticated) {
return (
<a
className="save-search-profile__action save-search-profile__action--link"
href={
'/accounts/login/?next=' +
window.location.pathname +
window.location.search
}
>
<Icon />
{loginText}
</a>
<div className="save-search-profile">
<a
className="save-search-profile__action save-search-profile__action--link"
href={
'/accounts/login/?next=' +
window.location.pathname +
window.location.search
}
>
<Icon />
{loginText}
</a>
</div>
)
}

if (searchProfile) {
return (
<a className="save-search-profile__action save-search-profile__action--link" href="/account/search-profiles">
{viewText}
</a>
<div className="save-search-profile">
<a className="save-search-profile__action save-search-profile__action--link" href="/account/search-profiles">
{viewText}
</a>
</div>
)
}

return <CreateSearchProfileButton {...props} searchProfilesCount={searchProfilesCount} />
return (
<div className="save-search-profile">
<CreateSearchProfileButton {...props} searchProfilesCount={searchProfilesCount} />
</div>
)
}

function CreateSearchProfileButton ({
Expand Down

0 comments on commit b8c8488

Please sign in to comment.