@deriv/quill-icons 1.17.6 → 1.17.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +70 -35
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="./svg/Logo/LogoBrandDerivLogoCoral.svg" alt="Deriv Quill Icons">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# [Deriv Quill Icons](https://quill-icons-park.pages.dev/)
|
|
4
|
+
|
|
5
|
+
[npm-image]: https://img.shields.io/npm/v/@deriv/quill-icons.svg?style=flat-square
|
|
6
|
+
[npm-url]: https://www.npmjs.com/package/@deriv/quill-icons
|
|
7
|
+
|
|
8
|
+
[![npm][npm-image]][npm-url]
|
|
9
|
+
|
|
10
|
+
Explore and integrate the complete set of icons from [Deriv](https://deriv.com/) with easy-to-use React components. These icons are exported from a Figma Icon project.
|
|
11
|
+
|
|
12
|
+
## The motivation of creating this library
|
|
13
|
+
|
|
14
|
+
We developed the Deriv Quill Icons library to address several critical considerations across our projects:
|
|
15
|
+
|
|
16
|
+
1. **Consistency across all of our projects:** By creating Deriv Quill Icons we ensure a consistent design language across all of our applications. All icons will have a similar style, size, and color.
|
|
17
|
+
2. **Easy Maintenance:** Managing all of the icons in a centralised library makes it easier to update or modify them. If we decide to change the design or add new icons, we only need to make changes in one place, and the updates will be reflected throughout all of our applications.
|
|
18
|
+
3. **Reuse and Efficiency:** We can easily reuse the same set of icons across different components and pages in our applications. This promotes code reusability and reduces redundancy, as we don't have to duplicate icon assets or styles.
|
|
19
|
+
4. **Customisation:** It allows us to customise our icons globally. For example, we can change the color scheme, size, or other visual aspects of all icons in one place without modifying individual components. Also we can easily apply optimisations to all of our icons in one place.
|
|
20
|
+
5. **Developer Productivity:** It enhances our developer productivity. Developers can easily find and use the icons they need without having to search for or create new assets each time.
|
|
21
|
+
|
|
22
|
+
and ...
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm i @deriv/quill-icons
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Usage**
|
|
31
|
+
|
|
32
|
+
```jsx
|
|
33
|
+
import { CurrencyAlgoIcon } from '@deriv/quill-icons';
|
|
34
|
+
|
|
35
|
+
const TestComponent = () => (
|
|
36
|
+
<h3>
|
|
37
|
+
Lets go for a <CurrencyAlgoIcon />?
|
|
38
|
+
</h3>
|
|
39
|
+
);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
<hr />
|
|
43
|
+
|
|
44
|
+
# Contribution Guidelines
|
|
4
45
|
|
|
5
46
|
## Prerequisite
|
|
6
47
|
|
|
@@ -8,38 +49,36 @@ We use [@figma-export](https://www.npmjs.com/package/@figma-export/cli) to expor
|
|
|
8
49
|
|
|
9
50
|
With [@figma-export](https://www.npmjs.com/package/@figma-export/cli) we export to handle `SVG` creation for each `Figma Component` and then with [transform-svg-with-svgo](https://github.com/marcomontalbano/figma-exporter/blob/HEAD/packages/cli/packages/transform-svg-with-svgo) we optimize the exported `SVG`s. this is a transformer and you can add/remove/update `SVG` attributes with it.
|
|
10
51
|
|
|
11
|
-
##
|
|
52
|
+
## Outputters
|
|
12
53
|
|
|
13
|
-
- [@figma-export/output-components-as-svg](https://github.com/marcomontalbano/figma-exporter/blob/HEAD/packages/cli/packages/output-components-as-svg)
|
|
54
|
+
- [@figma-export/output-components-as-svg](https://github.com/marcomontalbano/figma-exporter/blob/HEAD/packages/cli/packages/output-components-as-svg):
|
|
14
55
|
We use this to generate `SVG` files, you can check them in `svg` folder.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
We use this to generate `React` Components based on `transformed ( optimized ) SVG` files. you can check them in `src/react` folder.
|
|
56
|
+
- [@figma-export/output-components-as-svgr](https://github.com/marcomontalbano/figma-exporter/blob/HEAD/packages/cli/packages/output-components-as-svgr):
|
|
57
|
+
We use this to generate `React` Components based on `transformed (optimized) SVG` files. you can check them in `src/react` folder.
|
|
18
58
|
|
|
19
59
|
## Pre-installation
|
|
20
60
|
|
|
21
61
|
- node >=16.16.0
|
|
22
62
|
- npm >=7.21.0
|
|
23
63
|
- git (for `contribution`)
|
|
24
|
-
- Figma Token (
|
|
25
|
-
- Figma File
|
|
26
|
-
- Figma icons page
|
|
64
|
+
- Figma Token (Check [This](https://www.figma.com/developers/api#authentication) to set it up for yourself)
|
|
65
|
+
- Figma File ID
|
|
66
|
+
- Figma icons page
|
|
27
67
|
|
|
28
68
|
## Quick start
|
|
29
69
|
|
|
30
|
-
1. **Enter project directory**
|
|
70
|
+
1. **Enter the project directory**
|
|
31
71
|
|
|
32
72
|
```sh
|
|
33
|
-
cd
|
|
73
|
+
cd quill-icons
|
|
34
74
|
```
|
|
35
75
|
|
|
36
|
-
2.
|
|
37
|
-
|
|
76
|
+
2. Create a `.env` file inside `quill-icons` folder with this content:
|
|
77
|
+
|
|
38
78
|
```
|
|
39
|
-
FIGMA_TOKEN=
|
|
40
|
-
FILE_ID=XegjSl9fWXH2O7Mxo0Ctie
|
|
41
|
-
ICONS_PAGE=deriv-icons
|
|
79
|
+
FIGMA_TOKEN=your_figma_access_token
|
|
42
80
|
```
|
|
81
|
+
|
|
43
82
|
3. **Install your dependencies:**
|
|
44
83
|
|
|
45
84
|
```sh
|
|
@@ -56,27 +95,23 @@ With [@figma-export](https://www.npmjs.com/package/@figma-export/cli) we export
|
|
|
56
95
|
|
|
57
96
|
## Figma Components Conventions
|
|
58
97
|
|
|
59
|
-
|
|
98
|
+
Currently, we don't have specific conventions. We will update this section in coordination with the design team.
|
|
60
99
|
|
|
61
|
-
##
|
|
100
|
+
## Exporting New Icons
|
|
62
101
|
|
|
63
|
-
|
|
102
|
+
To export new icons, run `npm run rebuild`. It will automatically export, optimize, and convert SVGs to React components. Afterward, just commit the changes and create a new PR.
|
|
64
103
|
|
|
65
|
-
|
|
66
|
-
Configure the environment variables of the platform with these:
|
|
67
|
-
```
|
|
68
|
-
FIGMA_TOKEN=YOUR_FIGMA_TOKEN
|
|
69
|
-
FILE_ID=XegjSl9fWXH2O7Mxo0Ctie
|
|
70
|
-
ICONS_PAGE=deriv-icons
|
|
71
|
-
```
|
|
72
|
-
2. **Install your dependencies:**
|
|
104
|
+
## Build and Publish
|
|
73
105
|
|
|
74
|
-
|
|
75
|
-
npm ci
|
|
76
|
-
```
|
|
106
|
+
We use **[semantic-release](https://semantic-release.gitbook.io/semantic-release/)** for automating the release workflow. Commit messages determine the release type. Refer to the table below for guidelines.
|
|
77
107
|
|
|
78
|
-
|
|
108
|
+
| Commit message | Release type |
|
|
109
|
+
| ----------------------------------- | --------------------------- |
|
|
110
|
+
| build, ci, chore, docs, style, test | **Patch** (Fix Release) |
|
|
111
|
+
| refactor | **Minor** (Feature Release) |
|
|
79
112
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
113
|
+
**Triggering a release**
|
|
114
|
+
|
|
115
|
+
For each new commit added to one of the release branches (for example: main, next, beta), with git push or by merging a pull request or merging from another branch, a CI build is triggered and runs the semantic-release command to make a release if there are codebase changes since the last release that affect the package functionalities.
|
|
116
|
+
|
|
117
|
+
For further information please checkout the **[semantic-release](https://semantic-release.gitbook.io/semantic-release/)** documentation.
|