Skip to content

Commit

Permalink
add: string helper를 만들고 html 줄바꿈 스트링 변환 메소드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bonomoon committed Dec 1, 2020
1 parent aeee7de commit 1976cfe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/util/StringHelper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const renderHTMLStringWithNewLine = (str) => {
return str.split("\n").map((line) => {
return (
<span>
{line}
<br />
</span>
);
});
};

0 comments on commit 1976cfe

Please sign in to comment.