@@ -46,6 +46,7 @@ import { css } from '@uifabric/utilities/lib/css';
46
46
import * as strings from 'ControlStrings' ;
47
47
import { useForceUpdate } from '@uifabric/react-hooks' ;
48
48
import { ModernTermPicker } from '../modernTermPicker/ModernTermPicker' ;
49
+ import { IReadonlyTheme } from "@microsoft/sp-component-base" ;
49
50
50
51
export interface ITaxonomyFormProps {
51
52
context : BaseComponentContext ;
@@ -64,6 +65,7 @@ export interface ITaxonomyFormProps {
64
65
onRenderItem ?: ( props : IPickerItemProps < ITermInfo > ) => JSX . Element ;
65
66
getTextFromItem : ( item : ITermInfo , currentValue ?: string ) => string ;
66
67
languageTag : string ;
68
+ themeVariant ?: IReadonlyTheme ;
67
69
}
68
70
69
71
export function TaxonomyPanelContents ( props : ITaxonomyFormProps ) : React . ReactElement < ITaxonomyFormProps > {
@@ -282,7 +284,7 @@ export function TaxonomyPanelContents(props: ITaxonomyFormProps): React.ReactEle
282
284
checked = { isSelected }
283
285
styles = { selectedStyles }
284
286
disabled = { isDisabled }
285
- onRenderLabel = { ( p ) => < span className = { css ( styles . checkbox , isSelected && styles . selectedCheckbox ) } title = { p . title } >
287
+ onRenderLabel = { ( p ) => < span className = { css ( ! isDisabled && styles . checkbox , isDisabled && styles . disabledCheckbox , isSelected && styles . selectedCheckbox ) } title = { p . title } >
286
288
{ p . label }
287
289
</ span > }
288
290
/>
@@ -296,7 +298,7 @@ export function TaxonomyPanelContents(props: ITaxonomyFormProps): React.ReactEle
296
298
text : groupHeaderProps . group . name ,
297
299
styles : selectedStyle ,
298
300
onRenderLabel : ( p ) =>
299
- < span id = { p . labelId } className = { css ( styles . choiceOption , isSelected && styles . selectedChoiceOption ) } >
301
+ < span id = { p . labelId } className = { css ( ! isDisabled && styles . choiceOption , isDisabled && styles . disabledChoiceOption , isSelected && styles . selectedChoiceOption ) } >
300
302
{ p . text }
301
303
</ span >
302
304
} ] ;
@@ -322,8 +324,8 @@ export function TaxonomyPanelContents(props: ITaxonomyFormProps): React.ReactEle
322
324
323
325
const onRenderHeader = ( headerProps : IGroupHeaderProps ) : JSX . Element => {
324
326
const groupHeaderStyles : IStyleFunctionOrObject < IGroupHeaderStyleProps , IGroupHeaderStyles > = {
325
- expand : { height : 42 , visibility : ! headerProps . group . children || headerProps . group . level === 0 ? "hidden" : "visible" } ,
326
- expandIsCollapsed : { visibility : ! headerProps . group . children || headerProps . group . level === 0 ? "hidden" : "visible" } ,
327
+ expand : { height : 42 , visibility : ! headerProps . group . children || headerProps . group . level === 0 ? "hidden" : "visible" , fontSize : 14 } ,
328
+ expandIsCollapsed : { visibility : ! headerProps . group . children || headerProps . group . level === 0 ? "hidden" : "visible" , fontSize : 14 } ,
327
329
check : { display : 'none' } ,
328
330
headerCount : { display : 'none' } ,
329
331
groupHeaderContainer : { height : 36 , paddingTop : 3 , paddingBottom : 3 , paddingLeft : 3 , paddingRight : 3 , alignItems : 'center' , } ,
@@ -337,6 +339,7 @@ export function TaxonomyPanelContents(props: ITaxonomyFormProps): React.ReactEle
337
339
onRenderTitle = { onRenderTitle }
338
340
onToggleCollapse = { onToggleCollapse }
339
341
indentWidth = { 20 }
342
+ expandButtonProps = { { style : { color : props . themeVariant ?. semanticColors . bodyText } } }
340
343
/>
341
344
) ;
342
345
} ;
@@ -441,6 +444,7 @@ export function TaxonomyPanelContents(props: ITaxonomyFormProps): React.ReactEle
441
444
} }
442
445
onRenderSuggestionsItem = { props . onRenderSuggestionsItem }
443
446
onRenderItem = { props . onRenderItem }
447
+ themeVariant = { props . themeVariant }
444
448
/>
445
449
</ div >
446
450
</ div >
0 commit comments