@@ -23,6 +23,7 @@ interface FeatureProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onCha
23
23
feature : CompositeFeature | GenericExposedFeature ;
24
24
deviceState : DeviceState ;
25
25
device : Device ;
26
+ depth : number ;
26
27
stepsConfiguration ?: Record < string , unknown > ;
27
28
onChange ( endpoint : Endpoint , value : Record < string , unknown > ) : void ;
28
29
onRead ( endpoint : Endpoint , value : Record < string , unknown > ) : void ;
@@ -32,7 +33,7 @@ interface FeatureProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onCha
32
33
33
34
export const Feature = ( props : FeatureProps ) : JSX . Element => {
34
35
35
- const { feature, device, deviceState, stepsConfiguration, onRead, onChange, featureWrapperClass : FeatureWrapper , minimal } = props ;
36
+ const { feature, device, deviceState, stepsConfiguration, onRead, onChange, featureWrapperClass : FeatureWrapper , minimal, depth } = props ;
36
37
37
38
const genericParams = { key : JSON . stringify ( feature ) , device, deviceState, onChange, onRead, featureWrapperClass : FeatureWrapper , minimal } ;
38
39
const wrapperParams = { key : JSON . stringify ( feature ) , feature, onRead, deviceState } ;
@@ -77,7 +78,7 @@ export const Feature = (props: FeatureProps): JSX.Element => {
77
78
return < Fan feature = { feature } { ...genericParams } />
78
79
} else if ( isCompositeFeature ( feature ) ) {
79
80
return < FeatureWrapper { ...wrapperParams } >
80
- < Composite type = "composite" feature = { feature } { ...genericParams } deviceState = { ( deviceState [ feature . property ] ?? { } ) as DeviceState } />
81
+ < Composite type = "composite" feature = { feature } { ...genericParams } depth = { depth } deviceState = { ( deviceState [ feature . property ] ?? { } ) as DeviceState } />
81
82
</ FeatureWrapper >
82
83
}
83
84
return ( < FeatureWrapper { ...wrapperParams } >
0 commit comments