UNPKG

@render-props/paragraphs

Version:

A function as child component which provides an interface for creating paragraphs with line breaks from raw text with `\n` new lines. The default render child is: ```js const defaultParagraph = props => <p key={props.key} children={props.text}/> ```

42 lines (41 loc) 1.53 kB
{ "version": "0.1.14", "main": "cjs/index.js", "module": "es/index.js", "jsnext:main": "es/index.js", "esnext": "es/index.js", "scripts": { "build": "yarn run build:es && yarn run build:cjs", "build:es": "rimraf es && cross-env NODE_ENV=production BABEL_ENV=es babel src --out-dir es && npm run prettier:es", "build:cjs": "rimraf cjs && cross-env NODE_ENV=production BABEL_ENV=cjs babel src --out-dir cjs && npm run prettier:cjs", "build:publish": "yarn run build && yarn publish --access public", "edit": "atom ./", "watch:es": "cross-env NODE_ENV=development BABEL_ENV=es babel ./src -w --out-dir es", "prettier:es": "prettier --single-quote --no-semi --no-bracket-spacing --trailing-comma es5 --write \"es/**/*.js\"", "prettier:cjs": "prettier --single-quote --no-semi --no-bracket-spacing --trailing-comma es5 --write \"cjs/**/*.js\"" }, "author": "Jared Lunde <jared@tessellate.io> (https://github.com/jaredLunde)", "sideEffects": false, "analyze": true, "license": "MIT", "repository": "https://github.com/jaredLunde/render-props/tree/master/packages/paragraphs", "keywords": [ "react", "paragraphs", "nl2br", "nl2p" ], "name": "@render-props/paragraphs", "devDependencies": { "@stellar-apps/babel-preset-es": "^1.0.4", "@stellar-apps/babel-preset-react": "^1.0.1", "prettier": "^1.10.2" }, "dependencies": { "@babel/runtime": "^7.4.0" }, "peerDependencies": { "prop-types": ">= 15.6.0", "react": ">= 16.0.0" } }