Skip to content

Commit

Permalink
Merge pull request #1373 from danskernesdigitalebibliotek/revert-1359…
Browse files Browse the repository at this point in the history
…-DDFLSBP-637-change-advance-search-dropdown-to-img

Revert "DDFLSBP-637 - Change advanced search input element into and img element"
  • Loading branch information
Dresse authored Aug 13, 2024
2 parents 4408657 + 42f6ce1 commit a7dd996
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
11 changes: 5 additions & 6 deletions src/components/search-bar/search-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ const SearchBar: React.FC<SearchBarProps> = ({
}
}}
/>
<button
type="button"
<input
type="image"
src={expandIcon}
alt={t("searchHeaderDropdownText")}
className={clsx("header__menu-dropdown-icon", {
"header__menu-dropdown-icon--expanded": isHeaderDropdownOpen
})}
Expand All @@ -105,10 +107,7 @@ const SearchBar: React.FC<SearchBarProps> = ({
aria-label={t("searchHeaderDropdownText")}
data-cy="search-header-dropdown-icon"
aria-expanded={isHeaderDropdownOpen}
aria-controls="search-header-dropdown"
>
<img src={expandIcon} alt="" />
</button>
/>
</>
);
};
Expand Down
14 changes: 5 additions & 9 deletions src/components/search-bar/story-header.dev.inc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,14 @@ const StoryHeader: React.FC<StoryHeaderProps> = ({ search, userProfile }) => {
<input
type="image"
src={searchIcon}
alt="search-button"
className="header__menu-search-icon"
alt="search icon"
/>
<button
type="button"
<img
className="header__menu-dropdown-icon"
aria-label="dropdown with advanced search"
aria-expanded="false"
aria-controls="search-header-dropdown"
>
<img src={expandIcon} alt="" />
</button>
src={expandIcon}
alt="expand dropdown icon"
/>
</div>
)}
</div>
Expand Down

0 comments on commit a7dd996

Please sign in to comment.