mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 20:24:32 +02:00
improved display - no odd cutoffs (#3401)
This commit is contained in:
@@ -57,29 +57,27 @@ export function SeeMoreBlock({
|
||||
onClick={toggleDocumentSelection}
|
||||
className={`
|
||||
${documentSelectionToggled ? "border-border-100 border" : ""}
|
||||
cursor-pointer w-[150px] rounded-sm flex-none transition-all duration-500 hover:bg-background-125 bg-text-100 px-3 py-2.5
|
||||
cursor-pointer rounded-sm flex-none transition-all duration-500 hover:bg-background-125 bg-text-100 px-3 py-2.5
|
||||
`}
|
||||
>
|
||||
<div className="line-clamp-1 font-semibold text-ellipsis text-text-900 flex h-6 items-center justify-between text-sm">
|
||||
<p className="mr-0 flex-shrink-0">
|
||||
<div className="flex h-6 items-center text-sm">
|
||||
<p className="flex-1 mr-1 font-semibold text-text-900 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{documentSelectionToggled ? "Hide sources" : "See context"}
|
||||
</p>
|
||||
<div className="flex -space-x-3 flex-shrink-0 overflow-hidden">
|
||||
{uniqueSources.map((sourceType, ind) => (
|
||||
<div
|
||||
key={ind}
|
||||
className="inline-block bg-background-100 rounded-full p-0.5"
|
||||
style={{ zIndex: uniqueSources.length - ind }}
|
||||
>
|
||||
<div className="bg-background-100 rounded-full">
|
||||
<SourceIcon sourceType={sourceType} iconSize={20} />
|
||||
</div>
|
||||
<div className="flex-shrink-0 flex items-center">
|
||||
{uniqueSources.slice(0, 3).map((sourceType, ind) => (
|
||||
<div key={ind} className="inline-block ml-1">
|
||||
<SourceIcon sourceType={sourceType} iconSize={16} />
|
||||
</div>
|
||||
))}
|
||||
{uniqueSources.length > 3 && (
|
||||
<span className="text-xs text-text-700 font-semibold ml-1">
|
||||
+{uniqueSources.length - 3}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="line-clamp-2 text-sm font-semibold"></div>
|
||||
<div className="line-clamp-2 text-sm font-normal leading-snug text-text-700">
|
||||
<div className="line-clamp-2 text-sm font-normal leading-snug text-text-700 mt-1">
|
||||
See more
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user