Skip to content

bug: property style doesn't work on root IonPage #24442

@natqe

Description

@natqe

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Property style doesn't passing through an IonPage component

Expected Behavior

Property style should be passing to the actual IonPage element get rendered on the DOM

Steps to Reproduce

minimal ionic-react code

import { IonApp, IonContent, IonHeader, IonPage, IonTitle, IonToolbar, setupIonicReact } from '@ionic/react'
import '@ionic/react/css/core.css'
import { createRoot } from 'react-dom'

setupIonicReact()

createRoot(document.getElementById('root')).render(<IonApp>
  <IonPage style={{ backgroundColor: 'black !important' }}>
    <IonHeader>
      <IonToolbar>
        <IonTitle>My Title</IonTitle>
      </IonToolbar>
    </IonHeader>
    <IonContent>
      Hello World
    </IonContent>
  </IonPage>
</IonApp>)

Code Reproduction URL

https://github.com/natqe/ionic-page-style-not-working/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions