Changing zim label color when results are found, this helps the user find their results faster.

This commit is contained in:
Roland 2024-03-16 19:58:12 -06:00
parent 4c647241d6
commit c8e93f84aa
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -259,6 +259,8 @@ const ZimAccordion = ({data, index, activeIndex, onClick, searchStr, activeTags}
<Paginator activePage={pages.activePage} totalPages={pages.totalPages} onPageChange={pages.setPage}/>
</center>;
const label = <Label color={estimate > 0 ? 'violet' : undefined}>{normalizeEstimate(estimate)}</Label>;
return <React.Fragment>
<AccordionTitle
index={index}
@ -266,7 +268,7 @@ const ZimAccordion = ({data, index, activeIndex, onClick, searchStr, activeTags}
onClick={() => onClick(index, activeIndex)}
>
<Header as='h3'>
<Icon name='dropdown'/> {title} <Label>{normalizeEstimate(estimate)}</Label>
<Icon name='dropdown'/> {title} {label}
</Header>
</AccordionTitle>
<AccordionContent active={index === activeIndex}>