@@ -34,6 +34,9 @@ const sizeClasses = {
3434 tag : {
3535 container : "rounded-08 p-1 gap-1" ,
3636 } ,
37+ button : {
38+ container : "rounded-08 h-[2.25rem] min-w-[2.25rem] p-2 gap-1" ,
39+ } ,
3740} as const ;
3841
3942/**
@@ -271,8 +274,8 @@ const QueryText = ({
271274 * Props for the SourceTag component.
272275 */
273276export interface SourceTagProps {
274- /** Use inline citation size (smaller, for use within text) */
275- inlineCitation ?: boolean ;
277+ /** Sizing variant: "inlineCitation" for compact in-text use, "button" for interactive contexts, "tag" (default) for standard display */
278+ variant ?: "inlineCitation" | "tag" | "button" ;
276279
277280 /** Display name shown on the tag (e.g., "Google Drive", "Business Insider") */
278281 displayName : string ;
@@ -314,7 +317,7 @@ export interface SourceTagProps {
314317 * - Shows stacked source icons + display name
315318 * - Hovering opens a details card with source navigation
316319 *
317- * **Inline Citation** (`inlineCitation`):
320+ * **Inline Citation** (`variant=" inlineCitation" `):
318321 * - Compact size for use within text content
319322 * - Shows "+N" count for multiple sources
320323 *
@@ -341,7 +344,7 @@ export interface SourceTagProps {
341344 *
342345 * // Inline citation within text
343346 * <SourceTag
344- * inlineCitation
347+ * variant=" inlineCitation"
345348 * displayName="Source 1"
346349 * sources={multipleSources}
347350 * />
@@ -355,7 +358,7 @@ export interface SourceTagProps {
355358 * ```
356359 */
357360const SourceTagInner = ( {
358- inlineCitation ,
361+ variant = "tag" ,
359362 displayName,
360363 displayUrl,
361364 sources,
@@ -367,6 +370,8 @@ const SourceTagInner = ({
367370 toggleSource,
368371 tooltipText,
369372} : SourceTagProps ) => {
373+ const inlineCitation = variant === "inlineCitation" ;
374+
370375 const [ currentIndex , setCurrentIndex ] = useState ( 0 ) ;
371376 const [ isOpen , setIsOpen ] = useState ( false ) ;
372377 const [ expanded , setExpanded ] = useState ( false ) ;
@@ -383,7 +388,7 @@ const SourceTagInner = ({
383388
384389 const extraCount = sources . length - 1 ;
385390
386- const size = inlineCitation ? "inlineCitation" : "tag" ;
391+ const size = variant ;
387392 const styles = sizeClasses [ size ] ;
388393
389394 // Shared text styling props
0 commit comments