forked from ionic-team/ionicons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(custom-elements): export ionicons/components
Also provide ionicons as a custom element which can be defined using `customElements.define()` ``` import { IonIcon } from "ionicons/components/ion-icon"; customElements.define("ion-icon", IonIcon); ``` The custom element build works the same as the lazy load build, and is also able to lazy load svgs on demand, either by giving it an exact url in the `src` attribute `<ion-icon src="./path/to/airplane.svg"></ion-icon>`, or by providing the name of the ionicon to load `<ion-icon name="airplane"></ion-icon>`. If using the `name` attribute, you'll also need to set where to find the svg directory using `setAssetPath()` ``` import { setAssetPath } from "ionicons/components"; setAssetPath(location.href); ```
- Loading branch information
1 parent
b1c23f8
commit 66556ea
Showing
7 changed files
with
4,102 additions
and
17,388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ log.txt | |
.idea/ | ||
.versions/ | ||
.vscode/ | ||
components/ | ||
node_modules/ | ||
tmp/ | ||
dist/ | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters