lucide-vue Deprecation warning (#1663)

* Add Vue deprecation warning

* Add deprecation warning docs page

* Fix typo

* Update warning text
This commit is contained in:
Eric Fennis
2023-11-24 08:14:47 +01:00
committed by GitHub
parent 149ee36e61
commit e77959e1a6
2 changed files with 14 additions and 0 deletions
+5
View File
@@ -2,6 +2,11 @@
Implementation of the lucide icon library for Vue applications.
::: warning
This package will be deprecated end of 2023. Vue v2 will be EOF at the end of 2023 See [Announcement](https://v2.vuejs.org/lts/). We recommend to migrate to Vue 3.
The Lucide Vue package will be only maintained for Vue 3 after the deprecation.
:::
## Vue 2 or Vue 3
::: tip
@@ -2,6 +2,8 @@ import { Component } from 'vue';
import { Vue, VueConfiguration } from 'vue/types/vue';
import defaultAttributes from './defaultAttributes';
var showDeprecationWarning = true;
type IconNode = [elementName: string, attrs: Record<string, string>][]
/**
@@ -47,6 +49,13 @@ export default (iconName: string, iconNode: IconNode): Component => ({
children = [],
},
) {
if (showDeprecationWarning) {
console.warn(
'[Lucide Vue] This package will be deprecated end of 2023. Please upgrade to Vue 3 and use the latest lucide package for Vue.',
);
showDeprecationWarning = false;
}
return createElement(
'svg',
{