Unverified Commit c1f40d07 authored by Cole Bemis's avatar Cole Bemis Committed by GitHub

docs: Update README.md

parent ad8fabb5
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment