Skip to content

Commit 9c18508

Browse files
committed
fix(Icon): remove deprecation warnings
1 parent 681dbe0 commit 9c18508

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/components/Icon.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type {
1818

1919
<script setup lang="ts">
2020
import { computed } from 'vue'
21-
import icons, { DEPRECATED_ICONS } from './icons'
21+
import icons from './icons'
2222
import { type IconSize, type IconIdentifier, type AnyIconName } from './icons/types'
2323
2424
defineOptions({
@@ -65,23 +65,11 @@ const iconComponent = computed(() => {
6565
} else if (props.name) {
6666
size = props.size
6767
name = props.name.charAt(0).toUpperCase() + props.name.slice(1)
68-
const kebabName = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
69-
console.warn(
70-
`The "name" and "size" props are deprecated and will be removed in the next major version.
71-
Use the "icon" prop instead: <a-icon icon="${kebabName}-${size}" />`
72-
)
7368
} else {
7469
console.error('a-icon: either "icon" or "name" prop is required')
7570
return null
7671
}
7772
78-
if (DEPRECATED_ICONS[size].includes(name)) {
79-
console.warn(
80-
`Icon "${name}" in size "${size}" is deprecated and will be removed in the next major version.
81-
Use another supported size or alternative icon, see storybook docs https://honeycomb.archilogic.com`
82-
)
83-
}
84-
8573
if (icons[size][name]) {
8674
return icons[size][name]
8775
} else {

0 commit comments

Comments
 (0)