Update MaterialIcon.vue (#154)

* Remove MDI (doesn't seem to work)
* Add ability to style iconOnly flag
This commit is contained in:
Andreas E 2020-05-03 08:11:54 +02:00 committed by GitHub
parent 1b660d5dde
commit 32aa58270c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 26 deletions

5
package-lock.json generated
View File

@ -2686,11 +2686,6 @@
"to-fast-properties": "^2.0.0" "to-fast-properties": "^2.0.0"
} }
}, },
"@mdi/font": {
"version": "5.1.45",
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-5.1.45.tgz",
"integrity": "sha512-7H1UMwUpEp8mthdPlpAi7bhEyvTbvtK1TlA89scc0cXMpQy0UFygdkaf+6fveIxpBcRNgw0gnGSEonlsfYocXg=="
},
"@mrmlnc/readdir-enhanced": { "@mrmlnc/readdir-enhanced": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",

View File

@ -28,7 +28,6 @@
"vuepress-plugin-container": "^2.1.3" "vuepress-plugin-container": "^2.1.3"
}, },
"dependencies": { "dependencies": {
"@mdi/font": "^5.1.45",
"axios": "^0.19.2", "axios": "^0.19.2",
"iso-639-1": "^2.1.1", "iso-639-1": "^2.1.1",
"lodash.groupby": "^4.6.0", "lodash.groupby": "^4.6.0",

View File

@ -1,8 +1,5 @@
<template> <template>
<i v-if="iconOnly" class="material-icons">{{ iconName }}</i> <i v-if="iconOnly" :class="name" class="material-icons">{{ iconName }}</i>
<div v-else-if="legacy" :class="name" class="material-holder">
<i :class="iconName" class="material-legacy-icons mdi"></i>
</div>
<div v-else :class="name" class="material-holder"> <div v-else :class="name" class="material-holder">
<i class="material-icons">{{ iconName }}</i> <i class="material-icons">{{ iconName }}</i>
</div> </div>
@ -12,9 +9,6 @@
/** /**
* For material icon references use https://material.io/resources/icons/ * For material icon references use https://material.io/resources/icons/
* Code example: <MaterialIcon iconName="android" /> * Code example: <MaterialIcon iconName="android" />
*
* For material icon references use https://materialdesignicons.com/
* Code example: <MaterialIcon iconName="mdi-glasses" legacy />
*/ */
export default { export default {
props: { props: {
@ -22,10 +16,6 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
legacy: {
type: Boolean,
default: false
},
name: { name: {
type: String, type: String,
default: "" default: ""
@ -63,8 +53,4 @@ export default {
font-feature-settings 'liga' font-feature-settings 'liga'
-webkit-font-smoothing antialiased -webkit-font-smoothing antialiased
.material-legacy-icons
font-family 'Material Design Icons'
font-size 1.35em
font-style normal
</style> </style>

View File

@ -4,8 +4,3 @@
font-weight 400 font-weight 400
src url('~material-design-icons/iconfont/MaterialIcons-Regular.eot') src url('~material-design-icons/iconfont/MaterialIcons-Regular.eot')
src local('Material Icons'), local('MaterialIcons-Regular'), url('~material-design-icons/iconfont/MaterialIcons-Regular.woff2') format('woff2'), url('~material-design-icons/iconfont/MaterialIcons-Regular.woff') format('woff'), url('~material-design-icons/iconfont/MaterialIcons-Regular.ttf') format('truetype'), url('~material-design-icons/iconfont/MaterialIcons-Regular.svg#MaterialIcons-Regular') format('svg') src local('Material Icons'), local('MaterialIcons-Regular'), url('~material-design-icons/iconfont/MaterialIcons-Regular.woff2') format('woff2'), url('~material-design-icons/iconfont/MaterialIcons-Regular.woff') format('woff'), url('~material-design-icons/iconfont/MaterialIcons-Regular.ttf') format('truetype'), url('~material-design-icons/iconfont/MaterialIcons-Regular.svg#MaterialIcons-Regular') format('svg')
@font-face
font-family 'Material Design Icons'
src url('~@mdi/font/fonts/materialdesignicons-webfont.eot')
src local('Material Design Icons'), local('Material-Design-Icons'), url('~@mdi/font/fonts/materialdesignicons-webfont.woff2') format('woff2'), url('~@mdi/font/fonts/materialdesignicons-webfont.woff') format('woff'), url('~@mdi/font/fonts/materialdesignicons-webfont.ttf') format('truetype')