Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Inject icon component into slot-left/right #18

Open
CoreyVincent opened this issue Mar 4, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@CoreyVincent
Copy link

Currently, I'm using SVG to show an icon. But it would be nice to be able to inject a component into the slot.

Example:

if (toast) toast('Blue', {
    duration: false,
    positionY: 'top',
    positionX: 'right',
    disableClick: false,
    class: ['bg-blue-400', 'rounded-sm'],
    slotLeft: '<svg className="max-w-6 max-h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>'
})

image

Would become:

import { XCircleIcon } from '@heroicons/vue/solid'
toast('Blue', {
    duration: false,
    positionY: 'top',
    positionX: 'right',
    disableClick: false,
    class: ['bg-blue-400', 'rounded-sm'],
    slotLeft: '<XCircleIcon class="max-h-5 max-w-5" />'
})

image
image

@Daniel-Knights
Copy link
Owner

No idea how this could be implemented, but agree it'd be really useful. There's a similar issue here #11

@Daniel-Knights Daniel-Knights added the enhancement New feature or request label Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants