nandorojo / burnt

Crunchy toasts for React Native. 🍞
MIT License
1.16k stars 36 forks source link

feat: supports custom and without icon #11

Closed alantoa closed 1 year ago

alantoa commented 1 year ago

Why

burnt has not supported some features below:

  1. large text, now only supported one line of text. if you pass some long text will be omitted.
  2. custom ios icon, now only support error and done icon.
  3. hide icons, sometimes we need to hide icons.
  4. some parameters are not required but the ts type is required.

so I made this PR to support them.

How

update some ts type and improve the BurntModule.swift native module.

Test

https://user-images.githubusercontent.com/37520667/222522792-f7b5d7d3-5f5b-4a51-913a-fbf1a2cb213d.mp4

nandorojo commented 1 year ago

This is awesome! I left a few minor notes. Happy to merge once those are cleared up.

nandorojo commented 1 year ago

Lastly: it would be good to update the docs.

alantoa commented 1 year ago

just updated some of your comments, but I found some files have conflicts. so I move my commits here. their APIs are similar, you can choose which one to use. @nandorojo

https://github.com/nandorojo/burnt/pull/12/commits/2d6e8e50c6fd63b97bbe7a585c4ebc6ebb95385b

nandorojo commented 1 year ago

Closing this in favor of the other one. I left some comments there too.