# react-icon-base

> base element for react-icons

Latest version **2.1.2** (published 2017-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-icon-base
pnpm add react-icon-base
yarn add react-icon-base
bun add react-icon-base
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2017-12-16 |
| First published | 2015-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/react-icon-base) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Goran Gajic |
| Maintainers | bentatum, gorangajic |
| Keywords | react, icon, base |

## Links

- npm: https://www.npmjs.com/package/react-icon-base
- Repository: https://github.com/gorangajic/react-icon-base
- Homepage: https://github.com/gorangajic/react-icon-base#readme
- Issues: https://github.com/gorangajic/react-icon-base/issues
- npm.io page: https://npm.io/package/react-icon-base

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 2.1.2 (latest) — 2017-12-16
- 2.1.1 — 2017-09-27
- 2.1.0 — 2017-07-10
- 2.0.8 — 2017-05-23
- 2.0.7 — 2017-05-07
- 2.0.6 — 2017-05-04
- 2.0.5 — 2017-04-13
- 2.0.4 — 2016-10-15
- 2.0.3 — 2016-07-10
- 2.0.2 — 2016-07-06
- 2.0.0 — 2016-05-25
- 1.0.0 — 2015-12-03
- 0.1.0 — 2015-12-03
- 0.0.7 — 2015-12-02
- 0.0.6 — 2015-11-28
- … 5 more at https://npm.io/package/react-icon-base/versions

## README

## react-icon-base

[![npm][npm-image]][npm-url]

[npm-image]: https://img.shields.io/npm/v/react-icon-base.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/react-icon-base

base element for [react-icons](https://github.com/gorangajic/react-icons)

### Installation

```
npm install react-icon-base --save
```


### Usage

```js
import { default as React } from 'react'
import { default as IconBase } from 'react-icon-base'

export default class FaHeart extends React.Component {
    render() {
        return (
            <IconBase viewBox="0 0 1792 1896.0833" {...this.props}>
                <g><path d="m896 1664q-26 0-44-18l-624-602q-10-8-27.5-26t-55.5-65.5-68-97.5-53.5-121-23.5-138q0-220 127-344t351-124q62 0 126.5 21.5t120 58 95.5 68.5 76 68q36-36 76-68t95.5-68.5 120-58 126.5-21.5q224 0 351 124t127 344q0 221-229 450l-623 600q-18 18-44 18z"/></g>
            </IconBase>
        )
    }
}
```

### Configuration
You can configure react-icon-base props in context.

```js
class HigherOrderComponent extends Component {

    static childContextTypes = {
        reactIconBase: PropTypes.object
    };

    getChildContext() {
        return {
            reactIconBase: {
                color: 'tomato',
                size: 24,
                style: {
                    ...
                }
            }
        }
    }

    render() {
        ...
    }
}
```

Context can be overriden inline, like so:

```js
<Icon size={30} color='aliceblue' style={{ ... }} />
```

### Licence

MIT

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