@astrouxds/rux-icon
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -25,3 +25,4 @@ { | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"prepublish": "gulp rux-icon-svg" | ||
}, | ||
@@ -31,4 +32,4 @@ "publishConfig": { | ||
}, | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"gitHead": "4bba0d8002ae689eae718e188328d4e564aa94b0" | ||
} |
@@ -86,2 +86,3 @@ # Icons | ||
- Replaced [Polymer 3](https://www.polymer-project.org) implementation with [LitElement](https://lit-element.polymer-project.org/) for improved speed and interoperability with JS Frameworks as well as simpler template declaration now available in vanilla JavaScript. | ||
- Extended icon set with Google Material Design icons. License: https://github.com/google/material-design-icons/blob/master/LICENSE | ||
@@ -112,2 +113,2 @@ <a name="astro-4-migration"> | ||
<rux-icon library="/icons/my-namespaced-custom-icons.svg" icon="my-namespaced-prefix_settings"></rux-icon> | ||
``` | ||
``` |
@@ -30,2 +30,5 @@ import { LitElement, html } from 'lit-element'; | ||
}, | ||
viewBox: { | ||
type: String, | ||
}, | ||
}; | ||
@@ -37,5 +40,6 @@ } | ||
this.library = '/icons/astro.svg'; | ||
this.library = './icons/astro.svg'; | ||
/* TODO: a non-presumptive way to assign a better default label if the user doesn’t provide one */ | ||
this.label = 'icon'; | ||
this.viewBox = '0 0 24 24'; | ||
} | ||
@@ -69,11 +73,6 @@ | ||
height: 100%; | ||
width: auto; | ||
fill: var(--iconColor); | ||
width: auto; | ||
fill: var(--iconColor); | ||
} | ||
} | ||
.rux-button--outline rux-icon { | ||
} | ||
:host([size='extra-small']) { | ||
@@ -93,8 +92,13 @@ height: 1rem; | ||
} | ||
:host([size="base"]) { | ||
height: 24px; | ||
width: auto; | ||
} | ||
</style> | ||
<span id="rux-icon" title="${this.label}"> | ||
<span id="rux-icon"> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 128 128" | ||
viewBox="${this.viewBox}" | ||
preserveAspectRatio="xMidYMid meet" | ||
@@ -101,0 +105,0 @@ focusable="false" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
465232
4
94