mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-13 13:48:26 +00:00
lucide-vue Deprecation warning (#1663)
* Add Vue deprecation warning * Add deprecation warning docs page * Fix typo * Update warning text
This commit is contained in:
@@ -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',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user