notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
https://notiflix.github.io
MIT License
649 stars 55 forks source link

[BUG] - Icon size prop on Notify module #44

Closed Sparkenstein closed 2 years ago

Sparkenstein commented 2 years ago

Hi, just found out about this library, kudos! I looked into docs, if I understand correctly, svgSize is the prop that controls the size of internal svg icons. I am using notify module and it seems like svgSize doesn't exists on notify, it exists on other modules.

is there any other way I can control the size of icon on svg module?

Expected behavior Need a way to change svg icon on notify.

Screenshots image

Desktop (please complete the following information):

Additional context PS: on the other hand I have noticed few other bugs as well, if you want I can open separate issues for them. for the time being Just writing them here:

  1. the timeout property is not working, the notification doesn't go away automatically. using showOnlyTheLastOne as a workaround for now, would be really cool if this gets a fix.
  2. when I use useFontAwesome the icons are not visible, classes are getting applied, but can't see the icon at all. Do I have to install font-awesome for this?

heres my code:

Notify.success("Login successful", () => {}, {
        position: "center-top",
        timeout: 1000,
        showOnlyTheLastOne: true,
        width: "33%",
        borderRadius: "8px",
        fontSize: "14px",
        useIcon: true,
        success: {
          background: "#00CC6D",
        },
});
Sparkenstein commented 2 years ago

another cool to have option would be customSvgUrl in all of them, currenly it looks like it's only in loading module. so that I can just import my icon from library like

import { SomeIcon } from 'react-icons'; and give it to notiflix

furcan commented 2 years ago

Hi @Sparkenstein ,

I will try to give your answers one by one. There are too many questions in there 😊

Thanks, Furkan.