custom icons importation
This commit is contained in:
parent
bbde49479b
commit
d223a5b029
|
@ -7,16 +7,11 @@ import { useQuasar } from 'quasar';
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
|
||||||
quasar.iconMapFn = (iconName) => {
|
quasar.iconMapFn = (iconName) => {
|
||||||
// iconName is the content of QIcon "name" prop
|
if (iconName.startsWith('vn:')) {
|
||||||
|
|
||||||
// your custom approach, the following
|
|
||||||
// is just an example:
|
|
||||||
if (iconName.startsWith('vn:') === true) {
|
|
||||||
// we strip the "app:" part
|
|
||||||
const name = iconName.substring(3);
|
const name = iconName.substring(3);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
cls: 'icon-' + name,
|
cls: `icon-${name}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue