Skip to content

bug: IonTabBar does not have a style attribute in JSX. #21006

@ugaya40

Description

@ugaya40

Bug Report

Ionic version:
[x] 4.x
"@ionic/react": "^5.0.7",

Current behavior:
When I try to set the style property to IonTabBar, I get a compile error.

Property 'style' does not exist on type 'IntrinsicAttributes & IonTabBar & { onIonTabsDidChange?: ((event: CustomEvent<{ tab: string; }>) => void) | undefined; onIonTabsWillChange?: ((event: CustomEvent<...>) => void) | undefined; currentPath?: string | undefined; slot?: "bottom" | ... 1 more ... | undefined; } & { ...; }'.

Expected behavior:
no compile errors.

Steps to reproduce:

  1. crate app by ionic start myApp blank --type=react
  2. When I try to set the style to the IonTabBar of App.tsx, it reproduces it.
<IonTabBar style={{backgroundImage:""}} slot="bottom" >
  <IonTabButton tab="tab1" href="/tab1">
    <IonIcon icon={triangle} />
    <IonLabel>Tab 1</IonLabel>
  </IonTabButton>
  <IonTabButton tab="tab2" href="/tab2">
    <IonIcon icon={ellipse} />
    <IonLabel>Tab 2</IonLabel>
  </IonTabButton>
  <IonTabButton  tab="tab3" href="/tab3">
    <IonIcon icon={square} />
    <IonLabel>Tab 3</IonLabel>
  </IonTabButton>
</IonTabBar>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions