Holo-Host / ui-common-library

Common UI library code
MIT License
39 stars 1 forks source link

Featurte/allow props to be passed to modal #65

Closed mateuszRybczonek closed 1 year ago

mateuszRybczonek commented 1 year ago

This PR allows passing any props to the modal.

Now we can do this for example:

  showModal(EModal.redemption_initiated, {
    date: 1666828474041950,
    hfAmount: '1000000',
    requestId: 'dit7373ddjlg9204hfnfvu749506mvjshss7306mvjsd8',
    currency: 'HOT',
    hotAddress: '0x52908400098527886E0F7030069857D2E4169EE7',
    redemptionAmount: '1000000'
  })

and then read that props directly in the modal

const { modalProps } = useModals()