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 = {
9191 {
9292 value : 'google' ,
9393 label : 'Google'
94+ } ,
95+ {
96+ value : 'disabled' ,
97+ label : 'i am disabled' ,
98+ isDisabled : true
9499 }
95100 ] ,
96101 validate : [
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { Checkbox } from '@patternfly/react-core';
66import { CheckIcon } from '@patternfly/react-icons' ;
77
88const 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' : '' } ` } >
1010 { props . selectProps && props . selectProps && props . selectProps . isCheckbox && (
1111 < Checkbox
1212 isChecked = { props . isSelected || ( props . data && props . data . selected ) || false }
@@ -33,12 +33,14 @@ Option.propTypes = {
3333 } ) ,
3434 selectProps : PropTypes . shape ( {
3535 isCheckbox : PropTypes . bool
36- } )
36+ } ) ,
37+ isDisabled : PropTypes . bool
3738} ;
3839
3940Option . defaultProps = {
4041 isFocused : false ,
4142 isSelected : false ,
43+ isDisabled : false ,
4244 selectOption : ( ) => undefined ,
4345 selectProps : {
4446 isCheckbox : false
Original file line number Diff line number Diff line change 7676.ddorg__pf4-component-mapper__select__menu--option {
7777 display : flex ;
7878 align-items : center ;
79+ color : var (--pf-global--Color--dark-100 );
7980
8081 & .focused {
8182 background-color : var (--pf-global--Color--light-200 );
9394 padding-left : 0 ;
9495 }
9596 }
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+ }
96107}
97108
98109.ddorg__pf4-component-mapper__select__menu--option div {
You can’t perform that action at this time.
0 commit comments