1.0.4 • Published 6 years ago

react-interpunct v1.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

react-interpunct

React component to visibly display whitespace characters

NPM JavaScript Style Guide

Install

npm install --save react-interpunct

Usage

import React, { Component } from 'react'

import Interpunct from 'react-interpunct'

class Example extends Component {
  render () {
    return (
      <Interpunct>Your text with  spaces here  </Interpunct>
    )
  }
}

Outputs

Your·text·with··spaces·here··

Props

PropertyTypeDefaultDescription
childrenstringundefinedText to be rendered with Interpunct
matchLengthinteger1Minimum number of consecutive whitespace characters to match before replacing
replacementStringstring· (middle dot)String used to replace whitespace characters
respectLengthbooltrueWhen true the string given for replacementString will be repeated to the length of the matched whitespace. When false replacementString will replace the entire match
enablebooltrueIf set to false then children will be returned without manipulation

License

MIT © FoxxMD

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago