chunks.tsx 441 B

123456789101112131415161718192021222324
  1. import {cloneElement} from 'react';
  2. import styled from '@emotion/styled';
  3. import {ChunkType} from 'sentry/types';
  4. import Chunk from './chunk';
  5. type Props = {
  6. chunks: Array<ChunkType>;
  7. };
  8. const Chunks = ({chunks}: Props) => (
  9. <ChunksSpan>
  10. {chunks.map((chunk, key) => cloneElement(<Chunk chunk={chunk} />, {key}))}
  11. </ChunksSpan>
  12. );
  13. export default Chunks;
  14. const ChunksSpan = styled('span')`
  15. span {
  16. display: inline;
  17. }
  18. `;