nandorojo / burnt

Crunchy toasts for React Native. 🍞
MIT License
1.2k stars 37 forks source link

feat(new): supports custom and without icon #12

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

alantoa commented 1 year ago

also, we need to handle a case when the icon is not found, so I just committed this to catch some edge case.

https://user-images.githubusercontent.com/37520667/222682499-38bcfdf1-9ece-4574-a83f-05779528a98b.mp4

nandorojo commented 1 year ago

Left some extra notes @alantoa. I think the icon.layout needs to get fixed to match the new ios.icon API. I left notes on how to fix.

nandorojo commented 1 year ago

Is it all tested & good to go?

alantoa commented 1 year ago

@nandorojo yeah sure, I'm already using the patch file now!

nandorojo commented 1 year ago

Published at 0.10. Release notes added as well.