react-roman
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

react-roman

Travis

npm package

License

Display numbers in the form of roman numerals.

Install

yarn add react-roman

Usage

import React from 'react'
import Roman from 'react-roman'
 
export default () => <Roman>514</Roman>

You can also make usage of the internal romanize function if you so desire.

import React, { Component } from 'react'
import { romanize } from 'react-roman'
 
export default class App extends Component {
  onChange = event => {
    console.log(romanize(event.target.value))
  }
 
  render = () => {
    <div>
      <h1>When was Juluis Caesar assasinated?</h1>
      <input type='number' onChange={this.onChange} />
    </div>
  }
}
 

Package Sidebar

Install

npm i react-roman

Weekly Downloads

45

Version

2.0.0

License

MIT

Unpacked Size

4.37 kB

Total Files

7

Last publish

Collaborators

  • lasseborly