/** @format */ import React, { Fragment } from "react"; import styled from "styled-components"; import Divider from "./Divider"; import TextExpand from "./TextExpand"; import { device } from "../config/media"; import { ExtraStyleProps } from "../types/genericTypes"; const Wrapper = styled.dl` width: 100%; max-width: 70vw; display: flex; flex-direction: column; font-size: ${({ theme }) => theme.fontSizes.medium}; text-align: left; @media ${device.tablet} { max-width: 80vw; } @media ${device.mobileL} { max-width: 90vw; } `; interface TextExpandListProps extends ExtraStyleProps { data: { title: string; content?: string }[]; } function TextExpandList({ data, borderColor }: TextExpandListProps) { const dataLength = data && data.length; return ( {data.length ? data.map((item, index) => ( {index + 1 < dataLength ? ( ) : null} )) : null} ); } export default TextExpandList;