Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mruwnik committed Jun 8, 2024
1 parent 7e92c56 commit ad6a1c8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/components/Article/Contents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const addPopup = (e: HTMLElement, id: string, contents: string, mobile?: boolean
if (preexisting) return preexisting

const popup = document.createElement('div')
popup.className = 'link-popup bordered small background'
popup.className = 'link-popup bordered small background'
popup.innerHTML = contents
popup.id = id

Expand Down
7 changes: 4 additions & 3 deletions app/components/Article/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ article .glossary-entry {

article .link-popup {
visibility: hidden;
opacity: 0;
z-index: 4;
position: absolute;
top: 0;
width: 512px;
}

Expand Down Expand Up @@ -218,6 +215,10 @@ article .banner h3 .title {
flex-direction: row;
flex-wrap: wrap;
}

article .link-popup {
width: 100%;
}
article .footer-comtainer > div:nth-child(-n + 2) {
flex: 1 1;
}
Expand Down
1 change: 1 addition & 0 deletions app/components/Button/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
/* #### Composite button #### */
.composite-button {
cursor: pointer;
display: flex;
}

.composite-button > form .button,
Expand Down
10 changes: 8 additions & 2 deletions app/components/SearchResults/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export interface SearchResultsProps {
url: string
}

export const SearchResults = ({results}: {results: SearchResultsProps[]}) => {
export const SearchResults = ({
results,
onSelect,
}: {
results: SearchResultsProps[]
onSelect?: () => void
}) => {
const isMobile = useIsMobile()
const noResults = results.length === 0
if (noResults) {
Expand All @@ -34,7 +40,7 @@ export const SearchResults = ({results}: {results: SearchResultsProps[]}) => {
}

return (
<div className="container-search-results bordered col-5">
<div className="container-search-results bordered col-5" onClick={onSelect}>
{results.map((result, i) => (
<Link key={i} className="search-result" to={result.url}>
<Paper />
Expand Down
1 change: 1 addition & 0 deletions app/components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function Search({limitFromUrl, className}: Props) {
)}
{!isPendingSearch && searchPhrase && showResults && (
<SearchResults
onSelect={() => setShowResults(false)}
results={results.map((r) => ({
title: r.title,
url: questionUrl(r),
Expand Down

0 comments on commit ad6a1c8

Please sign in to comment.