🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

textwithnewlines

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textwithnewlines

A React Component for turning text with newlines into semantic paragraphs

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

TextWithNewlines

A React Component for turning text with newlines into semantic paragraphs.

Installation

npm install --save textwithnewlines

Usage

import TextWithNewlines from "textwithnewlines";

const sampleText = `The first paragraph

Another paragraph.

A third paragraph`;

class App extends React.Component {
  render() {
    return <TextWithNewlines>{sampleText}</TextWithNewlines>;
  }
}

Which will output:

<div>
  <p>
    First Paragraph
  </p>
  <p>
    Second Paragraph
  </p>
  <p>
    Third Paragraph
  </p>
</div>

Keywords

react

FAQs

Package last updated on 11 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts