File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
packages/react-ui-components/src/SelectBox_Option_SingleLine Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ class SelectBox_Option_SingleLine extends PureComponent {
18
18
19
19
className : PropTypes . string ,
20
20
21
+ icon : PropTypes . string ,
22
+
21
23
linkOptions : PropTypes . shape ( {
22
24
href : PropTypes . string . isRequired ,
23
25
target : PropTypes . string ,
@@ -35,14 +37,19 @@ class SelectBox_Option_SingleLine extends PureComponent {
35
37
[ className ] : className ,
36
38
[ style . linkedItem ] : linkOptions
37
39
} ) ;
40
+ const linkClassname = mergeClassNames ( {
41
+ [ style . dropdownLink ] : true ,
42
+ [ style . hasIcon ] : ( option . icon || icon ? true : false )
43
+ } ) ;
44
+
38
45
const previewElementIcon = option . icon ? option . icon : ( icon ? icon : null ) ;
39
46
40
47
return (
41
48
< ListPreviewElement { ...this . props } icon = { previewElementIcon } disabled = { isDisabled } className = { finalClassNames } >
42
49
{ linkOptions ? (
43
50
< a
44
51
{ ...linkOptions }
45
- className = { style . dropdownLink }
52
+ className = { linkClassname }
46
53
title = { option . title ? option . title : option . label } > { option . label } </ a >
47
54
) : (
48
55
< span title = { option . title ? option . title : option . label } > { option . label } </ span >
Original file line number Diff line number Diff line change 2
2
color : white;
3
3
padding : 5px 14px ;
4
4
display : inline-block;
5
+ width : 100% ;
6
+
7
+ }
8
+ .hasIcon {
9
+ width : calc (100% - 2em );
10
+ padding : 5px 0px ;
5
11
}
6
12
.linkedItem {
7
13
padding : 0px !important ;
You can’t perform that action at this time.
0 commit comments