Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jannicz committed Feb 17, 2022
1 parent e17a3e8 commit 7266573
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Or use combinations of several methods to achieve better results, like described

## Compatibility

This library is optimized for Angular 12, for 11 use [v. 1.10](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.10), for 10 use [v. 1.9](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.9).
This library is optimized for Angular 12, for 11 use [v. 1.10](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.10.0), for 10 use [v. 1.9](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.9.1).
If you combine multiple frameworks (i.e. React, Vue, etc.), it is recommended to use [svg-icon-sprite web component](https://www.npmjs.com/package/svg-icon-sprite) instead!

## Author & License
Expand Down
12 changes: 6 additions & 6 deletions projects/icon-sprite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ To use your SVGs from a sprite you need to:
### Step 1: Generate the sprite

First add the library [for sprite generation svg2sprite](https://github.com/mrmlnc/svg2sprite-cli) as a devDependency:

```json
"devDependencies": {
"svg2sprite-cli": "^2.0.1"
"svg2sprite-cli": "^2.0.1"
}
```

Each time you add an icon, you need to run the script generating the sprite. You might want to add it to your npm scripts:

```json
"scripts": {
"generate:svg-sprite": "svg2sprite ./src/assets/icons ./src/assets/sprites/sprite.svg --stripAttrs fill --stripAttrs stroke --stripAttrs id"
"generate:svg-sprite": "svg2sprite ./src/assets/icons ./src/assets/sprites/sprite.svg --stripAttrs fill --stripAttrs stroke --stripAttrs id"
}
```

Expand Down Expand Up @@ -104,7 +104,7 @@ Having a dynamic icon name:
## Options

- `src` - icon source name, the syntax is `path/file#icon` where `path` is relative to app folder, `file` is
the name of the sprite and `icon` is the filename of the svg icon.
the name of the sprite and `icon` is the filename of the svg icon.
- `width` *optional* - width of the svg in any length unit, i.e. `32px`, `50%`, `auto` etc., default is `100%`
- `height` *optional* - the height of the svg in any length unit, if undefined height will equal the width
- `classes` *optional* - class name(s) for this icon, default is `icon`
Expand Down Expand Up @@ -158,7 +158,7 @@ provide a separate sprite file that keeps the stroke and fill attributes:

```json
"scripts": {
"generate:svg-multicolor-sprite": "svg2sprite ./src/assets/svg-images ./src/assets/sprites/image-sprite.svg"
"generate:svg-multicolor-sprite": "svg2sprite ./src/assets/svg-images ./src/assets/sprites/image-sprite.svg"
}
```

Expand Down Expand Up @@ -212,7 +212,7 @@ Or use combinations of several methods to achieve better results, like described

## Compatibility

This library is optimized for Angular 12, for 11 use [v. 1.10](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.10), for 10 use [v. 1.9](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.9).
This library is optimized for Angular 12, for 11 use [v. 1.10](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.10.0), for 10 use [v. 1.9](https://www.npmjs.com/package/ng-svg-icon-sprite/v/1.9.1).
If you combine multiple frameworks (i.e. React, Vue, etc.), it is recommended to use [svg-icon-sprite web component](https://www.npmjs.com/package/svg-icon-sprite) instead!

## Author & License
Expand Down

0 comments on commit 7266573

Please sign in to comment.