Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,30 +78,38 @@ const AddTagOption: FunctionComponent<Props> = ({
overrideZIndex="z-modal"
>
<Menu a11yLabel="Tag selection menu" className="!px-0">
{navigationController.tags.map((tag) => (
<MenuItem
key={tag.uuid}
onClick={() => {
isTagLinkedToSelectedItems(tag) ? unlinkTagFromSelectedItems(tag) : linkTagToSelectedItems(tag)
}}
>
{tag.iconString && (
<Icon
type={tag.iconString as IconType}
size={'custom'}
className={'ml-0.5 mr-1.5 h-7 w-7 text-2xl text-neutral lg:h-6 lg:w-6 lg:text-lg'}
/>
)}
<span
className={classNames(
'overflow-hidden overflow-ellipsis whitespace-nowrap',
isTagLinkedToSelectedItems(tag) ? 'font-bold' : '',
)}
{navigationController.tags.map((tag) => {
const tagTitlePrefix = getTitleForLinkedTag(tag, application)?.titlePrefix
return (
<MenuItem
key={tag.uuid}
onClick={() => {
isTagLinkedToSelectedItems(tag) ? unlinkTagFromSelectedItems(tag) : linkTagToSelectedItems(tag)
}}
>
{getTitleForLinkedTag(tag, application)?.longTitle}
</span>
</MenuItem>
))}
{tag.iconString && (
<Icon
type={tag.iconString as IconType}
size={'custom'}
className={'ml-0.5 mr-1.5 h-7 w-7 text-2xl text-neutral lg:h-6 lg:w-6 lg:text-lg'}
/>
)}
<div>
{!!tagTitlePrefix && (
<p className="overflow-hidden overflow-ellipsis whitespace-nowrap text-neutral">{tagTitlePrefix}</p>
)}
<p
className={classNames(
'overflow-hidden overflow-ellipsis whitespace-nowrap',
isTagLinkedToSelectedItems(tag) ? 'font-bold' : '',
)}
>
{tag.title}
</p>
</div>
</MenuItem>
)
})}
</Menu>
</Popover>
</div>
Expand Down
Loading