How to override the style of an ionic component with styled-components

Viewed 374

I have this Ionic tabbar that I want to custom :

<IonTabBar>...</IonTabBar>

If I override the component like this...

const TabBar = styled(IonTabBar)`
  font-family : 'Montserrat';
`

<IonTab>...</IonTab>

... I get this error :

Uncaught Error: IonTabs needs a IonTabBar
    at IonTabs.render ...

Why ? Do I absolutely need to create a div container to custom the style ?

1 Answers
Related