diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-04-06 17:47:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 17:47:20 +0300 |
commit | 62df0ff96fc9ab832212d223150862c7667d9ffc (patch) | |
tree | 9159c443e970ea2a0819edffbe2fe5cc101c1001 /src/lib/Markdown/Text.tsx | |
parent | a72027d21154ba94e26d6b96092afc9704b8288c (diff) | |
parent | 400330fe5ebd6951a97f07b6147b3af6113e034f (diff) | |
download | react-benzin-3.1.0.tar.gz |
Merge pull request #8 from eug-vs/developv3.1.0
Markdown parser
Diffstat (limited to 'src/lib/Markdown/Text.tsx')
-rw-r--r-- | src/lib/Markdown/Text.tsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/Markdown/Text.tsx b/src/lib/Markdown/Text.tsx new file mode 100644 index 0000000..e287dee --- /dev/null +++ b/src/lib/Markdown/Text.tsx @@ -0,0 +1,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; + |