import { ListItemProps } from "antd/lib/list/Item"; import React from "react"; import { StyledList } from "./List.styled"; import { ListProps } from "./types"; const List: React.FC = props => { const { dataSource, type } = props; return ( { if (type === "ul") { return
  • {item as string}
  • ; } else if (type === "ol") { return (
  • {index + 1}. {item as string}
  • ); } return
  • {item as string}
  • ; }} /> ); }; export default List;