Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update icons to v6 and switch CDNs #27

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"archiver": "^4.0.1",
"fs-extra": "^9.0.1",
"highlight.js": "^10.1.1",
"ionicons": "5.5.2",
"ionicons": "6.0.2",
"prismic-dom": "^2.2.3",
"prismic-javascript": "^2.7.1"
},
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Instead, use a prefix that fits your company or any name for a group of related
### Script tag

- [Publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages)
- Put a script tag similar to this `<script src='https://unpkg.com/my-component@0.0.1/dist/mycomponent.js'></script>` in the head of your index.html
- Put a script tag similar to this `<script type="module" src='https://cdn.jsdelivr.net/npm/my-name@0.0.1/dist/myname.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc

### Node Modules
Expand Down
2 changes: 1 addition & 1 deletion src/components/footer-bar/footer-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FooterBar {
@Prop() version: string;

render() {
const cheatsheetUrl = `https://unpkg.com/ionicons@${this.version}/dist/cheatsheet.html`;
const cheatsheetUrl = `https://cdn.jsdelivr.net/npm/ionicons@${this.version}/dist/cheatsheet.html`;
return (
<footer>
<ResponsiveContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/components/toast-bar/toast-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class ToastBar {
</svg>
</div>

<a class="btn btn--gray btn--small download-link" href={`https://unpkg.com/ionicons@${this.version}/dist/svg/${iconAttrName}.svg`} onClick={(ev) => this.handleSVGDownload(ev, iconAttrName)}>
<a class="btn btn--gray btn--small download-link" href={`https://cdn.jsdelivr.net/npm/ionicons@${this.version}/dist/svg/${iconAttrName}.svg`} onClick={(ev) => this.handleSVGDownload(ev, iconAttrName)}>
{ this.isSVGDownloading
? <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" class="loading-animation">
<path d="M11 7C11 4.79086 9.20914 3 7 3C4.79086 3 3 4.79086 3 7C3 9.20914 4.79086 11 7 11" stroke="url(#paint0_angular)"/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/usage-page/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export default function (version: string, name = "heart", suffix = "") {
</p>

{highlight(
`<script type="module" src="https://unpkg.com/ionicons@${version}/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@${version}/dist/ionicons/ionicons.js"></script>`
`<script type="module" src="https://cdn.jsdelivr.net/npm/ionicons@${version}/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/ionicons@${version}/dist/ionicons/ionicons.js"></script>`
)}

<h3 id="basic-usage">Basic usage</h3>
Expand Down
Loading