Skip to content

Commit

Permalink
multi dialogue search (#2752)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingawei authored Jul 29, 2024
1 parent 47dc66a commit 2cb748b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion web/components/answers/answers-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export function AnswersPanel(props: {
showSetDefaultSort?: boolean
setDefaultAnswerIdsToGraph?: (ids: string[]) => void
defaultAddAnswer?: boolean
floatingSearchClassName?: string
}) {
const {
contract,
Expand All @@ -112,6 +113,7 @@ export function AnswersPanel(props: {
showSetDefaultSort,
setDefaultAnswerIdsToGraph,
defaultAddAnswer,
floatingSearchClassName,
} = props
const { outcomeType, resolutions } = contract
const addAnswersMode =
Expand Down Expand Up @@ -251,7 +253,10 @@ export function AnswersPanel(props: {
canAddAnswer={canAddAnswer}
text={query}
setText={setQuery}
className={'bg-canvas-0 sticky top-[48px] z-40'}
className={clsx(
'bg-canvas-0 sticky z-40',
floatingSearchClassName ?? 'top-[48px]'
)}
sort={sort}
setSort={setSort}
showDefaultSort={showSetDefaultSort && contract.sort !== sort}
Expand Down
3 changes: 2 additions & 1 deletion web/components/bet/bet-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function MultiBetDialog(props: {
<>
<Link
href={contractPath(contract)}
className={clsx('mb-4 text-xl text-indigo-700', linkClass)}
className={clsx('text-primary-700 text-xl', linkClass)}
>
{question}
</Link>
Expand All @@ -109,6 +109,7 @@ export function MultiBetDialog(props: {
onAnswerHover={() => null}
onAnswerClick={() => null}
defaultAddAnswer={contract.addAnswersMode === 'ANYONE'}
floatingSearchClassName={'-top-8 pt-4'}
/>
)}
</>
Expand Down

0 comments on commit 2cb748b

Please sign in to comment.