Skip to content

Commit

Permalink
feat: reactive styling for ambiguous match summary
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Dec 29, 2023
1 parent 3044cdd commit 87e2350
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export const AmbiguousMatchesCard: React.FC<Props> = ({ match }) => {
</Box>
) : (
<Typography fontStyle="italic">
{match.searchTerm} is ambiguous. Please select context from drop down.
{match.searchTerm} is ambiguous. Please select context from drop
down.
</Typography>
)}
</AccordionDetails>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ export const AmbiguousTermsSummary: React.FC<AmbiguousTermsSummaryProps> = ({
}) => {
const isMobile = useGetIsMobile();
return !isLoading ? (
<Box display="flex" justifyContent="space-between" minHeight="50px" flexWrap={isMobile ? "wrap" : "nowrap"}>
<Box width={unmatchedTerms?.length > 0 && !isMobile ? '80%' : '100%'}>
<Box
display="flex"
justifyContent="space-between"
minHeight="50px"
flexWrap={isMobile ? 'wrap' : 'nowrap'}
>
<Box width={unmatchedTerms?.length > 0 && !isMobile ? '80%' : '100%'}>
{ambiguousTerms?.length > 0 ? (
ambiguousTerms?.map((term: any) => {
return (
Expand All @@ -42,7 +47,12 @@ export const AmbiguousTermsSummary: React.FC<AmbiguousTermsSummaryProps> = ({
)}
</Box>
{unmatchedTerms?.length > 0 && (
<Box width="20%" minWidth="fit-content" className="unmatched-terms" mt={isMobile ? 2 : 0}>
<Box
width="20%"
minWidth="fit-content"
className="unmatched-terms"
mt={isMobile ? 2 : 0}
>
<h3>
<b>Unmatched Terms:</b>
</h3>
Expand Down

0 comments on commit 87e2350

Please sign in to comment.