File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
packages/pf4-component-mapper Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ export const wizardSchema = {
91
91
{
92
92
value : 'google' ,
93
93
label : 'Google'
94
+ } ,
95
+ {
96
+ value : 'disabled' ,
97
+ label : 'i am disabled' ,
98
+ isDisabled : true
94
99
}
95
100
] ,
96
101
validate : [
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { Checkbox } from '@patternfly/react-core';
6
6
import { CheckIcon } from '@patternfly/react-icons' ;
7
7
8
8
const Option = ( props ) => (
9
- < div className = { `ddorg__pf4-component-mapper__select__menu--option ${ props . isFocused ? 'focused' : '' } ` } >
9
+ < div className = { `ddorg__pf4-component-mapper__select__menu--option ${ props . isFocused ? 'focused' : '' } ${ props . isDisabled ? 'disabled' : '' } ` } >
10
10
{ props . selectProps && props . selectProps && props . selectProps . isCheckbox && (
11
11
< Checkbox
12
12
isChecked = { props . isSelected || ( props . data && props . data . selected ) || false }
@@ -33,12 +33,14 @@ Option.propTypes = {
33
33
} ) ,
34
34
selectProps : PropTypes . shape ( {
35
35
isCheckbox : PropTypes . bool
36
- } )
36
+ } ) ,
37
+ isDisabled : PropTypes . bool
37
38
} ;
38
39
39
40
Option . defaultProps = {
40
41
isFocused : false ,
41
42
isSelected : false ,
43
+ isDisabled : false ,
42
44
selectOption : ( ) => undefined ,
43
45
selectProps : {
44
46
isCheckbox : false
Original file line number Diff line number Diff line change 76
76
.ddorg__pf4-component-mapper__select__menu--option {
77
77
display : flex ;
78
78
align-items : center ;
79
+ color : var (--pf-global--Color--dark-100 );
79
80
80
81
& .focused {
81
82
background-color : var (--pf-global--Color--light-200 );
93
94
padding-left : 0 ;
94
95
}
95
96
}
97
+
98
+ & .disabled {
99
+ cursor : default ;
100
+ }
101
+
102
+ & .disabled div {
103
+ color : var (--pf-global--disabled-color--100 );
104
+ pointer-events : none ;
105
+ cursor : none ;
106
+ }
96
107
}
97
108
98
109
.ddorg__pf4-component-mapper__select__menu--option div {
You can’t perform that action at this time.
0 commit comments