aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Markdown/Text.tsx
blob: be715fd247caced2ebf57f3c0ae12021ba0d23b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import React from 'react';
import SyntacticSpan, { splitter } from './SyntacticSpan';

interface PropTypes {
  line: string;
}

const Text: React.FC<PropTypes> = ({ line }) => {
  return <>{line.split(splitter).map(span => <SyntacticSpan span={span} />)}</>;
};

export default Text;