SideMenuDropDown.tsx 602 B

1234567891011121314151617181920212223
  1. import React, { SFC } from 'react';
  2. import DropDownChild from './DropDownChild';
  3. interface Props {
  4. link: any;
  5. }
  6. const SideMenuDropDown: SFC<Props> = props => {
  7. const { link } = props;
  8. return (
  9. <ul className="dropdown-menu dropdown-menu--sidemenu" role="menu">
  10. <li className="side-menu-header">
  11. <span className="sidemenu-item-text">{link.text}</span>
  12. </li>
  13. {link.children &&
  14. link.children.map((child, index) => {
  15. return <DropDownChild child={child} key={`${child.url}-${index}`} />;
  16. })}
  17. </ul>
  18. );
  19. };
  20. export default SideMenuDropDown;