Skip to content

Added React Native support and local testing setup #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
/figma-plugins/icon-export-helper/node_modules
/node_modules
/outline
/filled
/filled
tests/**/icons.json
/tmp-react-comps
*.tgz
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,34 @@ export default {

The outline icons can be imported from `@bitcoin-design/bitcoin-icons-vue/outline`, and the filled icons can be imported from `@bitcoin-design/bitcoin-icons-vue/filled`.

Icons use an upper camel case naming convention and are always suffixed with the word `Icon`.
Icons use an upper camel case naming convention and are always suffixed with the word `Icon`.

## React Native

[![npm version](https://img.shields.io/npm/v/@bitcoin-design/bitcoin-icons-react-native.svg?style=flat-square)](https://www.npmjs.com/package/@bitcoin-design/bitcoin-icons-react-native)
[![npm downloads](https://img.shields.io/npm/dm/@bitcoin-design/bitcoin-icons-react-native.svg?style=flat-square)](https://www.npmjs.com/package/@bitcoin-design/bitcoin-icons-react-native)

First, install `@bitcoin-design/bitcoin-icons-react-native` from npm:

```sh
npm install @bitcoin-design/bitcoin-icons-react-native
```

Now each icon can be imported individually as a React component:

```js
import { BitcoinIcon } from '@bitcoin-design/bitcoin-icons-react-native/filled'

function MyComponent() {
return (
<div>
<BitcoinIcon size={10} color={'#F7931A'} />
<p>...</p>
</div>
)
}
```

The outline icons can be imported from `@bitcoin-design/bitcoin-icons-react-native/outline`, and the filled icons can be imported from `@bitcoin-design/bitcoin-icons-react-native/filled`.

Icons use an upper camel case naming convention and are always suffixed with the word `Icon`.
Loading