1.0.2 • Published 5 years ago

@16g/react-simple-format v1.0.2

Weekly downloads
250
License
MIT
Repository
github
Last release
5 years ago

@16g/react-simple-format npm version CircleCI

Simple format component like Ruby on Rails simple_format inspired by rilkevb/react-simple-format

Installation

npm i --save @16g/react-simple-format

Usage

import SimpleFormat from '@16g/react-simple-format';

const text = "paragraph\n\nand another one";

<SimpleFormat text={text} />

Props

PropsTypeDefaultDescription
textstringundefinedText will be formatted simply
wrapperTagstring'p'HTML tag wraps paragraph of text
prefixnodeundefinedNode prepended to paragraph
postfixnodeundefinedNode appended to paragraph