title: How to pass a Component and his value as props
body: <p>Hello i want to pass a component and his value as a props and use the component that i passed with different values  </p>
  
  <p>there is my component : </p>
  
  <pre><code>const DropdownComponentImg = ({ valueDI }: DropdownProps) =&gt; (
  &lt;Img
    id="dropDownImgId"
    src={valueDI}
    width="25px"
    height="17px"
    radius="5px"
  /&gt;);
  </code></pre>
  
  <p>i want pass this component like this : </p>
  
  <pre><code>&lt;Dropdown
        type="component"
        colorLabel={colors.GREY_1}
        colorIcon={colors.GREY_5}
        value={ImgSrcDropdownValue}
        dropDownList={imgTelSrcList}
        DropDownComponent={DropdownComponentImg}
        dropDownWidth="100%"
        onClick={changeValueImgSrcDropdown}
      /&gt;
  </code></pre>
  
  <p>and use it like this </p>
  
  <pre><code>{dropDownList.map((item) =&gt; (
        &lt;SubA key={item.id} onClick={() =&gt; props.onClick(item)}&gt;
          &lt;ItemContent&gt;
            &lt;ItemFirstText&gt;
              {type === 'text' ? (
                item.value
              ) : type === 'component' ? (
                &lt;DropDownComponent value={item.value} /&gt;
              ) : null}
            &lt;/ItemFirstText&gt;
            {item.value1 ? (
              &lt;ItemSecondText&gt;{item.value1}&lt;/ItemSecondText&gt;
            ) : null}
          &lt;/ItemContent&gt;
        &lt;/SubA&gt;
      ))}
  </code></pre>