Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FDiskas committed Jun 30, 2021
0 parents commit 9d59c02
Show file tree
Hide file tree
Showing 11 changed files with 8,271 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Package

on:
create:
tags:
- v*

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
submodules: recursive
- uses: actions/setup-node@v2
with:
node-version: 14.x
registry-url: https://registry.npmjs.org
always-auth: true
- run: npm ci
- run: npm version "${GITHUB_REF:11}" --no-git-tag-version
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "FDiskas"
git commit -m "Release: ${GITHUB_REF:11}" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master

- uses: akhilmhdh/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
typings/
*.log
.DS_Store
lib/
src/icons/
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
feather/
api-extractor.json
tsconfig.json
.svgrrc.js
.gitmodules
src/
26 changes: 26 additions & 0 deletions .svgo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins:
- removeXMLNS: true
- removeViewBox: false
- removeDimensions: true # this deletes width/height and adds it to the viewBox
- removeDoctype: true
- removeComments: true
- removeMetadata: true
- removeEditorsNSData: true
- cleanupIDs: true
- removeRasterImages: true
- removeUselessDefs: true
- removeUnknownsAndDefaults: true
- removeUselessStrokeAndFill: true
- removeHiddenElems: true
- removeEmptyText: true
- removeEmptyAttrs: true
- removeEmptyContainers: true
- removeUnusedNS: true
- removeDesc: true
- prefixIds: false
- prefixClassNames: false
- convertStyleToAttrs: true
- removeAttrs:
attrs:
- "class"
- "style"
16 changes: 16 additions & 0 deletions .svgrrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
jsx: {
babelConfig: {
plugins: [
[
"@svgr/babel-plugin-replace-jsx-attribute-value",
{
"values": [
{ "value": "1em", "newValue": 24 },
]
}
]
],
},
},
}
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
## React Native Unicons Icons

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

#### What is react-native-unicons?

react-native-unicons is a collection of simply beautiful open source icons for React Native. Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency and readability.

At its core, Unicons is a collection of SVG files. To use SVG files on React Native, [`react-native-svg`](https://github.com/react-native-community/react-native-svg) is needed. This component contains "line" style Unicons icons converted and made compatible with [`react-native-svg`](https://github.com/react-native-community/react-native-svg) package.

#### Based on Unicons Icons `v4.0.0`

## Installation

1. Ensure sure you've installed [`react-native-svg`](https://github.com/react-native-community/react-native-svg)
2. `npm i react-native-unicons`

### Icons

List of available icons in this component.
[https://iconscout.com](https://iconscout.com/unicons/explore/line)

### Usage

To use icons as component, all icon names is formatted to Pascal Case.
award-alt => `<AwardAlt />`

```javascript
import { AwardAlt } from "react-native-unicons";

const App = () => {
return <AwardAlt />;
};
```

Icons can be configured with inline props:

```javascript
<AwardAlt stroke="red" fill="#fff" width={32} height={32} />
```

You can also include the whole icon pack:

```javascript
import * as Icon from "react-native-unicons";

const App = () => {
return <Icon.AwardAlt />;
};
```

### Properties

Any [Svg property](https://github.com/react-native-community/react-native-svg#common-props) and the following:

| Prop | Description | Default |
| ----------------- | -------------------------------------------------------------------- | ---------------- |
| **`width`** | Width of the icon. | `24` |
| **`height`** | Height of the icon. | `24` |
| **`stroke`** | The stroke prop refers to the color outline the icon. | `"currentColor"` |
| **`strokeWidth`** | The strokeWidth prop specifies the width of the outline on the icon. | `2` |
| **`fill`** | The fill prop refers to the color inside the icon. | `"none"` |

### Author

<!-- readme: FDiskas -start -->
<!-- readme: yigithanyucedag -end -->

## Contributors

<!-- readme: contributors -start -->
<!-- readme: contributors -end -->
Loading

0 comments on commit 9d59c02

Please sign in to comment.