# @feizheng/react-digital

> React digital.

Latest version **1.0.0** (published 2020-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @feizheng/react-digital
pnpm add @feizheng/react-digital
yarn add @feizheng/react-digital
bun add @feizheng/react-digital
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-02-21 |
| First published | 2020-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | afei |
| Maintainers | afeiship |
| Keywords | react, component |

## Links

- npm: https://www.npmjs.com/package/@feizheng/react-digital
- Repository: https://github.com/afeiship/react-digital
- Homepage: https://github.com/afeiship/react-digital#readme
- Issues: https://github.com/afeiship/react-digital/issues
- npm.io page: https://npm.io/package/@feizheng/react-digital

## Dependencies (3)

- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [@feizheng/noop](https://npm.io/package/@feizheng/noop.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-02-21

## README

# react-digital
> React digital.

## installation
```shell
npm install -S @feizheng/react-digital
```

## update
```shell
npm update @feizheng/react-digital
```

## properties
| Name      | Type   | Default | Description                           |
| --------- | ------ | ------- | ------------------------------------- |
| className | string | -       | The extended className for component. |
| value     | any    | ':'     | Default value.                        |
| onChange  | func   | noop    | The change handler.                   |
| flat      | bool   | false   | If digit equal width.                 |


## usage
1. import css
  ```scss
  @import "~@feizheng/react-digital/dist/style.scss";

  // customize your styles:
  $react-digital-options: ()
  ```
2. import js
  ```js
  import ReactDigital from '@feizheng/react-digital';
  import ReactDOM from 'react-dom';
  import React from 'react';
  import './assets/style.scss';

  class App extends React.Component {
    componentDidMount() {}
    render() {
      return (
        <div className="app-container">
          <div className="dib_ mr5_" style={{ fontSize: 20 }}>
            <ReactDigital value={2} />
            <ReactDigital value={0} />
            <ReactDigital value={1} />
            <ReactDigital value={7} />
            <ReactDigital value={'-'} />
            <ReactDigital value={1} />
            <ReactDigital value={2} />
            <ReactDigital value={'-'} />
            <ReactDigital value={0} />
            <ReactDigital value={7} />
          </div>
          <div className="mr5_" style={{ fontSize: 10, marginTop: 20 }}>
            <ReactDigital flat={true} className="dib" value={0} />
            <ReactDigital flat={true} className="dib" value={0} />
            <ReactDigital flat={true} className="dib" value={':'} />
            <ReactDigital flat={true} className="dib" value={1} />
            <ReactDigital flat={true} className="dib" value={6} />
            <ReactDigital flat={true} className="dib" value={':'} />
            <ReactDigital flat={true} className="dib" value={0} />
            <ReactDigital flat={true} className="dib" value={0} />
          </div>
        </div>
      );
    }
  }

  ReactDOM.render(<App />, document.getElementById('app'));

  ```

## documentation
- https://afeiship.github.io/react-digital/

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