wfp / designsystem

World Food Programme User Interface Kit. Developer kit for implementing WFP web style guideline.
http://www.wfp.org/UIGuide
Apache License 2.0
224 stars 103 forks source link

Added 'React.ReactNode' type to 'icon' prop of EmptyProps. #533

Closed bafficoluca closed 2 years ago

bafficoluca commented 2 years ago

This PR fixes a problem only related to Typescript.

The current Empty.d.ts declaration file doesn't allow you to pass other than an IIcon object to the icon prop. This fix is needed in order to being able to pass a Jsx element to the icon prop of the Empty component, as per documentation (check the React code of the example with the 'Moving Van' image). Without this fix we cannot use a static resource as icon/image for the Empty component.

Changelog

Changed

cassandrakesewa commented 2 years ago

@bafficoluca can you please create another PR into next instead of master? Thanks