buildo / react-components

Collection of general React components used in buildo projects.
http://react-components.buildo.io/
MIT License
157 stars 21 forks source link

Allow non-string headers in TabbedPanel #1459

Open tpetrucciani opened 3 years ago

tpetrucciani commented 3 years ago

Currently TabbedPanel accepts only string headers. However, since it simply renders the header, accepting other React elements should be possible, and it would be useful to display SVG icons.

As an example, passing a header like

(
  <View shrink={false} vAlignContent="bottom">
    <MySvgIcon/>
    {label}
  </View>
) as any,

(bypassing type checking) seems to work OK.