svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.3k stars 62 forks source link

[Feature Request] Allow for iconify icons #327

Closed Beiri22 closed 1 year ago

Beiri22 commented 1 year ago

Usage example, including component, action, motion, or utility API

Hi. I just wanted to use your Alert component with an icon of the iconify library. You can use the icon as follows:

<script lang="ts">
    import Icon from '@iconify/svelte';
    import warningIcon from '@iconify/icons-mdi/warning';
</script>

<Icon icon={warningIcon} />

In your example of the Alert-component, you just pass an icon component to the property. I tried similary something like

<Alert title="Warnung!" icon={Icon} iconProps={{icon: warningIcon}}></Alert>

but it does not show the icon. So maybe I'm doing it wrong, then please help me. If it's not possible, then I'd like to request this as a feature. You should be able to use the icon library of your choice.

Possible implementation - describe how the feature can be implemented

No response

Do you want to contribute this feature and create a pull request

No

BeeMargarida commented 1 year ago

Hum, this is expected behavior so I'm marking it as a bug for now.

longnguyen2004 commented 1 year ago

Same issue as #373

BeeMargarida commented 1 year ago

Same issue as #373

Yap, thank you, it's definitely that, I'll fix it