8000 refactor: extract from @coreui/react · coreui/coreui-icons-react@1ae2065 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ae2065

Browse files
committed
refactor: extract from @coreui/react
1 parent 7c43860 commit 1ae2065

25 files changed

+431
-14561
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 51 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 22 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 creativeLabs Łukasz Holeczek
3+
Copyright (c) 2021 creativeLabs Łukasz Holeczek
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

NWB.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.md

Lines changed: 59 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,89 @@
1-
### [@coreui/icons-react](https://coreui.io/) for [CoreUI for React](https://coreui.io/react/)
1+
<p align="center">
2+
<a href="https://coreui.io/">
3+
<img src="https://coreui.io/images/brand/coreui-icons.svg" alt="CoreUI Icons logo" height="50">
4+
</a>
5+
</p>
26

7+
<p align="center">
8+
Official React.js component for CoreUI Icons and CoreUI Icons PRO.
9+
<br>
10+
<a href="https://coreui.io/react/docs/components/icon/"><strong>Explore CoreUI Icons for React docs »</strong></a>
11+
<br>
12+
<br>
13+
<a href="https://github.com/coreui/coreui-icons/issues/new?template=bug_report.md">Report bug</a>
14+
·
15+
<a href="https://github.com/coreui/coreui-icons/issues/new?template=feature_request.md">Request feature</a>
16+
·
17+
<a href="https://blog.coreui.io/">Blog</a>
18+
</p>
19+
20+
21+
## Status
322
[![npm package][npm-badge]][npm]
423
[![NPM downloads][npm-download]][npm]
5-
![react](https://img.shields.io/badge/react-^17.0.1-lightgrey.svg?style=flat-square&logo=react)
24+
![react](https://img.shields.io/badge/react-^17.0.2-lightgrey.svg?style=flat-square&logo=react)
625

726

827
[npm-badge]: https://img.shields.io/npm/v/@coreui/icons-react/latest?style=flat-square
928
[npm]: https://www.npmjs.com/package/@coreui/icons-react
1029
[npm-download]: https://img.shields.io/npm/dm/@coreui/icons-react.svg?style=flat-square
1130

12-
##### docs:
13-
- https://coreui.io/react/docs/components/CIcon
14-
- https://icons.coreui.io/docs/using-coreui-icons-with/react/
31+
## Installation
1532

16-
##### install:
1733
```bash
1834
npm install @coreui/icons
1935
npm install @coreui/icons-react
2036
```
2137

22-
##### import:
38+
or
39+
40+
```bash
41+
yarn add @coreui/icons
42+
yarn add @coreui/icons-react
43+
```
44+
45+
## Use
46+
47+
### Single icon
48+
2349
```jsx
2450
import { CIcon } from '@coreui/icons-react';
2551
import { cifAU } from '@coreui/icons';
26-
```
27-
or:
28-
```scss
29-
@import '~@coreui/icons/css/all.css';
30-
```
3152

32-
##### usage:
33-
```jsx
34-
...
35-
class CoreUIIcons extends Component {
3653
...
3754
render() {
38-
return (
39-
<CIcon name="cil-list" size="2xl"/>
40-
)
55+
return (
56+
<CIcon icon={cilList} size="xxl"/>
57+
)
4158
}
4259
...
4360
```
4461

45-
---
62+
### All icons
4663

47-
- bootstrapped with [nwb](https://github.com/insin/nwb) toolkit
64+
```jsx
65+
import { CIcon } from '@coreui/icons-react';
66+
import * as icon from '@coreui/icons';
4867

49-
##### `npm run` scripts
68+
...
69+
render() {
70+
return (
71+
<CIcon icon={icon.cilList} size="xxl"/>
72+
)
73+
}
74+
...
75+
```
5076

51-
`package.json` is configured with `"scripts"` we can use with `npm run` while developing the project.
5277

53-
Command | Description |
54-
--- | ---
55-
`npm run build` | prepare for publishing to npm
56-
`npm run clean` | delete built resources
57-
`npm test` | run tests
58-
`npm run test:coverage` | run tests and produce a code coverage report in `coverage/`
59-
<del>`npm run test:watch`</del> | n/a ~~start a test server and re-run tests on every change~~
60-
<del>`npm start`</del> | n/a ~~start a development server for the demo app~~
78+
## API
6179

62-
#### see also:
63-
- [Developing React Components and Libraries with nwb](https://github.com/insin/nwb/blob/master/docs/guides/ReactComponents.md#developing-react-components-and-libraries-with-nwb)
80+
| property | type | description |
81+
| --- | --- | --- |
82+
| className | `string` | A string of all className you want applied to the component. |
83+
| customClassName | `string` \| `object` \| `string[]` | Use for replacing default CIcon component classes. Prop is overriding the 'size' prop. |
84+
| icon | `string` \| `string[]` | Name of the icon placed in React object or SVG content. |
85+
| height | `number` | The height attribute defines the vertical length of an icon. |
86+
| size | `sm` \| `md` \|`lg` \| `xl` \| `xxl` \| `3xl` \| `4xl` \| `5xl` \| `6xl` \| `7xl` \| `8xl` \| `9xl` | Size of the icon. |
87+
| use | `string` | If defined component will be rendered using `use` tag. |
88+
| title | `string` | Title tag content. |
89+
| width | `number` | The width attribute defines the horizontal length of an icon. |

link.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

nwb.config.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0