Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70811

Ionic React styles not rendering even after importing css file

$
0
0

I’m trying to use the ionic ui library(@ionic/react) to create the interface of my app.
I’ve included the core.css file from ionic.
But the components render without styles.

Following is the code in my App.js

import React from 'react'
import { IonButton } from '@ionic/react';


import '@ionic/react/css/core.css';

const App = () => {
  return (
    <>
      <IonButton color="primary">Primary</IonButton>
      <IonButton color="secondary">Secondary</IonButton>
      <IonButton color="tertiary">Tertiary</IonButton>
      <IonButton color="success">Success</IonButton>
      <IonButton color="warning">Warning</IonButton>
      <IonButton color="danger">Danger</IonButton>
      <IonButton color="light">Light</IonButton>
      <IonButton color="medium">Medium</IonButton>
      <IonButton color="dark">Dark</IonButton>
    </>
  )
}

export default App

check this image to see the result

dependencies versions: -
@ionic/react”: “^6.0.9”,
“react”: “^16.13.1”,

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70811

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>