This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ limitations under the License.
25
25
padding-right : 20px ;
26
26
}
27
27
28
+ .mx_IconizedContextMenu_optionList_label {
29
+ font-size : $font-15px ;
30
+ font-weight : $font-semi-bold ;
31
+ }
32
+
28
33
// the notFirst class is for cases where the optionList might be under a header of sorts.
29
34
& :nth-child (n + 2 ), .mx_IconizedContextMenu_optionList_notFirst {
30
35
// This is a bit of a hack when we could just use a simple border-top property,
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ interface IProps extends IContextMenuProps {
33
33
interface IOptionListProps {
34
34
first ?: boolean ;
35
35
red ?: boolean ;
36
+ label ?: string ;
36
37
className ?: string ;
37
38
}
38
39
@@ -101,13 +102,20 @@ export const IconizedContextMenuOption: React.FC<IOptionProps> = ({ label, iconC
101
102
</ MenuItem > ;
102
103
} ;
103
104
104
- export const IconizedContextMenuOptionList : React . FC < IOptionListProps > = ( { first, red, className, children } ) => {
105
+ export const IconizedContextMenuOptionList : React . FC < IOptionListProps > = ( {
106
+ first,
107
+ red,
108
+ className,
109
+ label,
110
+ children,
111
+ } ) => {
105
112
const classes = classNames ( "mx_IconizedContextMenu_optionList" , className , {
106
113
mx_IconizedContextMenu_optionList_notFirst : ! first ,
107
114
mx_IconizedContextMenu_optionList_red : red ,
108
115
} ) ;
109
116
110
117
return < div className = { classes } >
118
+ { label && < div > < span className = "mx_IconizedContextMenu_optionList_label" > { label } </ span > </ div > }
111
119
{ children }
112
120
</ div > ;
113
121
} ;
You can’t perform that action at this time.
0 commit comments