# react-native-naira

> A React Native package for displaying amount figures with the Nigerian Naira symbol.

Latest version **0.1.0** (published 2023-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-naira
pnpm add react-native-naira
yarn add react-native-naira
bun add react-native-naira
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-06-11 |
| First published | 2023-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Prince A.Nweke |
| Maintainers | starprince |

## Links

- npm: https://www.npmjs.com/package/react-native-naira
- Homepage: https://github.com/starprince7/React_Native_Naira
- npm.io page: https://npm.io/package/react-native-naira

## Dependencies (1)

- [intl](https://npm.io/package/intl.md) ^1.2.5

## Recent versions

- 0.1.0 (latest) — 2023-06-11

## README

# React Native Naira

A React Native package for displaying amount figures with the Nigerian Naira symbol.

## Installation

```
npm install react-native-naira
```
or

```
yarn add react-native-naira
```

## Usage

Import the `Naira` component and use in your JSX.

### Example 1
```javascript
import { Naira } from 'react-native-naira'

const App = () => {
  return (
    <Naira>{10000}</Naira> 
  )
}

```

### Example 2
Use inside a `Text` component.

E.g: `I Paid John ₦10,000 for his car today!`
```javascript
import * as React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { Naira } from 'react-native-naira'

const App = () => {
  return (
    <View style={styles.background}>
      <Text>I Paid John <Naira>{10000}</Naira> for his car today!</Text>
    </View>
  )
}

const styles = StyleSheet.create({
  background: {
    flex: 1,
    backgroundColor: "#3b4d61"
  },
  amount: {
    color: '#fff',
    fontSize: 25,
    fontWeight: "800"
  }
})

export default App
```

### Props
| Props        | Type                    | Required | Description |
| -------------|-------------------------| ---------| ----------- |
| style        | `StyleProp<TextStyle>`  | Optional | Add your styles directly to the component. |
| decimalPlaces| `number`                | Optional | This prop is used to describe the number of digits that appear after the decimal point in a number. |
| children     | `number`                | true     | Pass a number to be rendered by the component. The value you pass here must not be a string! |



### Testing

This package uses Jest for testing, make sure you have the following configurations setup in package.json file:
```json
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
```

## Licensing

This project is licensed under MIT license.

---
_Source: https://npm.io/package/react-native-naira · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
