@@ -64,13 +64,19 @@ export interface MentionsProps extends BaseTextareaAttrs {
64
64
onFocus ?: React . FocusEventHandler < HTMLTextAreaElement > ;
65
65
onBlur ?: React . FocusEventHandler < HTMLTextAreaElement > ;
66
66
getPopupContainer ?: ( ) => HTMLElement ;
67
- dropdownClassName ?: string ;
67
+ popupClassName ?: string ;
68
68
/** @private Testing usage. Do not use in prod. It will not work as your expect. */
69
69
open ?: boolean ;
70
70
children ?: React . ReactNode ;
71
71
options ?: DataDrivenOptionProps [ ] ;
72
72
classNames ?: CommonInputProps [ 'classNames' ] & {
73
73
mentions ?: string ;
74
+ textarea ?: string ;
75
+ popup ?: string ;
76
+ } ;
77
+ styles ?: {
78
+ textarea ?: React . CSSProperties ;
79
+ popup ?: React . CSSProperties ;
74
80
} ;
75
81
onPopupScroll ?: ( event : React . UIEvent < HTMLDivElement > ) => void ;
76
82
}
@@ -92,6 +98,8 @@ const InternalMentions = forwardRef<MentionsRef, MentionsProps>(
92
98
prefixCls,
93
99
className,
94
100
style,
101
+ classNames : mentionClassNames ,
102
+ styles,
95
103
96
104
// Misc
97
105
prefix = '@' ,
@@ -123,7 +131,7 @@ const InternalMentions = forwardRef<MentionsRef, MentionsProps>(
123
131
placement,
124
132
direction,
125
133
getPopupContainer,
126
- dropdownClassName ,
134
+ popupClassName ,
127
135
128
136
rows = 1 ,
129
137
@@ -473,6 +481,8 @@ const InternalMentions = forwardRef<MentionsRef, MentionsProps>(
473
481
ref = { containerRef }
474
482
>
475
483
< TextArea
484
+ classNames = { { textarea : mentionClassNames ?. textarea } }
485
+ styles = { { textarea : styles ?. textarea } }
476
486
ref = { textareaRef }
477
487
value = { mergedValue }
478
488
{ ...restProps }
@@ -506,7 +516,11 @@ const InternalMentions = forwardRef<MentionsRef, MentionsProps>(
506
516
options = { mergedOptions }
507
517
visible
508
518
getPopupContainer = { getPopupContainer }
509
- dropdownClassName = { dropdownClassName }
519
+ popupClassName = { classNames (
520
+ popupClassName ,
521
+ mentionClassNames ?. popup ,
522
+ ) }
523
+ popupStyle = { styles ?. popup }
510
524
>
511
525
< span > { mergedMeasurePrefix } </ span >
512
526
</ KeywordTrigger >
@@ -530,7 +544,8 @@ const Mentions = forwardRef<MentionsRef, MentionsProps>(
530
544
value : customValue ,
531
545
allowClear,
532
546
onChange,
533
- classNames : classes ,
547
+ classNames : mentionsClassNames ,
548
+ styles,
534
549
className,
535
550
disabled,
536
551
onClear,
@@ -573,13 +588,15 @@ const Mentions = forwardRef<MentionsRef, MentionsProps>(
573
588
allowClear = { allowClear }
574
589
handleReset = { handleReset }
575
590
className = { className }
576
- classNames = { classes }
591
+ classNames = { mentionsClassNames }
577
592
disabled = { disabled }
578
593
ref = { holderRef }
579
594
onClear = { onClear }
580
595
>
581
596
< InternalMentions
582
- className = { classes ?. mentions }
597
+ className = { mentionsClassNames ?. mentions }
598
+ styles = { styles }
599
+ classNames = { mentionsClassNames }
583
600
prefixCls = { prefixCls }
584
601
ref = { mentionRef }
585
602
onChange = { triggerChange }
0 commit comments