# react-native-tiny-components

> Components for React Native

Latest version **0.0.4** (published 2022-03-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-tiny-components
pnpm add react-native-tiny-components
yarn add react-native-tiny-components
bun add react-native-tiny-components
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-03-14 |
| First published | 2022-03-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Harish Acharya |
| Maintainers | harish_acharya |
| Keywords | react-native, CheckBox, RadioButton, PopupComponent |

## Links

- npm: https://www.npmjs.com/package/react-native-tiny-components
- Repository: https://github.com/harish1094/react-native-tiny-components
- Homepage: https://github.com/harish1094/react-native-tiny-components#readme
- Issues: https://github.com/harish1094/react-native-tiny-components/issues
- npm.io page: https://npm.io/package/react-native-tiny-components

## Dependencies (1)

- [react-native-vector-icons](https://npm.io/package/react-native-vector-icons.md) ^6.6.0

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2022-03-14
- 0.0.3 — 2022-03-14
- 0.0.2 — 2022-03-12
- 0.0.1 — 2022-03-12

## README

# react-native-tiny-components

## Getting started

`$ npm install react-native-tiny-components`


## Usage

```javascript
import { CheckBox, RadioButton, PopupComponent } from "react-native-tiny-components";


import React, { Component } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';

export default class ExampleApp extends Component {

  constructor(props) {
    super(props);
    this.state = {
      checked: false,
      active: false
    }
  }

  render() {
    return (
      <View style={{}} >
        <CheckBox
          name={"Select"}
          checked={this.state.checked}
          onChecked={(value) => {
            this.setState({ checked: value })
          }}
          textStyle={{ color: "black", fontSize: 16 }}
          color={"rgb(50, 168, 111)"}
          size={30} />

        <RadioButton
          textStyle={{ color: "black", fontSize: 16 }}
          name="Click Here"
          onChecked={(value) => {
            this.setState({ active: value })
          }}
          active={this.state.active}
          color={"#203546"}
          size={30} />

        <TouchableOpacity style={{
          padding: 5,
          backgroundColor: "#203546",
          margin: 10,
          height: 50,
          alignItems: "center",
          justifyContent: "center"
        }}
          onPress={() => {
            this.refs.popup.openDialog();
          }}>
          <Text style={{ color: "white", fontSize: 18 }}>{"Toggle Popup"}</Text>
        </TouchableOpacity>
        
        <PopupComponent ref="popup"
          components={
            <View style={{ backgroundColor: "white" }}>
              <Text>{"Message"}</Text>
            </View>
          }
          headerText="Click Here"
        />
      </View>
    )
  }
}


```

## CheckBox
### Props

| Prop          | Type     | Optional | Default | Description                                                                                                                         |
| ------------- | -------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | Yes      |         | Title of checkbox.                                                      |
| `checked`   | Boolean | No      |         | value for the checkbox is checked or not . |
| `onChecked`   | Function | No      |         | Is called when an the checkbox is clicked . |
| `color`   | String | Yes      |         | Color for the check mark . |
| `size`   | Integer | Yes      |         | Size for the checkbox . |
| `textStyle`   | Style | Yes      |         | Style for the name . |


## RadioButton
### Props

| Prop          | Type     | Optional | Default | Description                                                                                                                         |
| ------------- | -------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | Yes      |         | Title for the radio button.                                                      |
| `active`   | Boolean | No      |         | value for the radio button is checked or not . |
| `onChecked`   | Function | No      |         | Is called when an the radio button is clicked . |
| `color`   | String | Yes      |         | Color for the radio button  . |
| `size`   | Integer | Yes      |         | Size for the radio button . |
| `textStyle`   | Style | Yes      |         | Style for the name . |



## PopupComponent
### Props

| Prop          | Type     | Optional | Default | Description                                                                                                                         |
| ------------- | -------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `ref` | String | Yes      |         | Will be used to toggle popup window.                                                      |
| `components`   | JSX Components | No      |         | Whatever is passed in the components prop will be show in the popup body. |
| `headerText`   | String | No      |         | Title for the popup . |
| `headerStyle`   | Style | Yes      |         | Style for the Title text . |
| `headerTextStyle`   | Style | Yes      |         | Style for the Title text container . |



## Note : This repo is still under construction

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