How to refer an interface property as a parameter value to another functional component
interface InterfaceProperties
{
interfaceProperty1Id: number,
interfaceProperty1Name : string
}
const tabsInterfaces: Map<InterfaceDetailEnum, JSX.Element> = new Map<InterfaceDetailEnum, JSX.Element>([
[InterfaceDetailEnum.Detail, <InterfaceDetailMessages id={} name={} />],
[InterfaceDetailEnum.Type, <></>],
[InterfaceDetailEnum.Both, <></>]
]);
I want to pass the interface properties in the below line.
<InterfaceDetailMessages id={} name={} />]
That means, in id
, I want to pass interfaceProperty1Id
and in name
I want to pass interfaceProperty1Name
properties.
Thanks in advance