mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
docs: Update README.md
This commit is contained in:
parent
ad8fabb569
commit
c1f40d07c8
12
README.md
12
README.md
@ -164,7 +164,7 @@ See the [API Reference](#api-reference) for more information about the available
|
||||
|
||||
### `feather.icons`
|
||||
|
||||
An object with information about every icon.
|
||||
An object with data about every icon.
|
||||
|
||||
#### Usage
|
||||
|
||||
@ -172,7 +172,7 @@ An object with information about every icon.
|
||||
feather.icons.x
|
||||
// {
|
||||
// name: 'x',
|
||||
// contents: '<line ... /><line ... />`,
|
||||
// contents: '<line ... /><line ... />',
|
||||
// tags: ['cancel', 'close', 'delete', 'remove'],
|
||||
// attrs: {
|
||||
// class: 'feather feather-x',
|
||||
@ -189,11 +189,13 @@ feather.icons.x
|
||||
// }
|
||||
|
||||
feather.icons.x.toString()
|
||||
// '<line ... /><line ... />`
|
||||
// '<line ... /><line ... />'
|
||||
```
|
||||
|
||||
[View Source](https://github.com/colebemis/feather/blob/master/src/icons.js)
|
||||
|
||||
---
|
||||
|
||||
### `feather.icons[name].toSvg([attrs])`
|
||||
|
||||
Returns an SVG string.
|
||||
@ -219,6 +221,8 @@ feather.icons.circle.toSvg({ class: 'foo bar' })
|
||||
|
||||
[View Source](https://github.com/colebemis/feather/blob/master/src/icon.js)
|
||||
|
||||
---
|
||||
|
||||
### `feather.replace([attrs])`
|
||||
|
||||
Replaces all elements that have a `data-feather` attribute with SVG markup corresponding to the element's `data-feather` attribute value.
|
||||
@ -275,6 +279,8 @@ All attributes on the placeholder element (i.e. `<i>`) will be copied to the `<s
|
||||
|
||||
[View Source](https://github.com/colebemis/feather/blob/master/src/replace.js)
|
||||
|
||||
---
|
||||
|
||||
### [DEPRECATED] `feather.toSvg(name, [attrs])`
|
||||
|
||||
> **Note:** `feather.toSvg()` is deprecated. Please use `feather.icons[name].toSvg()` instead.
|
||||
|
Loading…
Reference in New Issue
Block a user