File size: 515 Bytes
e6a9f90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import React from 'react';
import { Section } from '../../types/Conversation';

interface SectionItemProps {
  section: Section;
  position: 'before' | 'active' | 'after';
  displayProp: string;
}

const SectionItem: React.FC<SectionItemProps> = ({ section, position, displayProp }) => {
  return (
    <div className={`section-item ${position}`}>
      <div className="section-content">
        <p className="section-sentence">{section[displayProp]}</p>
      </div>
    </div>
  );
};

export default SectionItem;