Topic: classes not loaded

get4sachin free asked 4 years ago


Expected behavior

After import mdbreact-4.17.0.tgz file , all css should automatically loaded , in your example it is working

{ "color": "indigo", "dark": true, "expand": "md", "style": { "marginTop": "20px" }, "children": [ "", "", "" ], "tag": "nav", "scrolling": false }

Actual behavior

but in my case only class name coming while inspective element but css not loaded LIKE { "color": "default-color", "dark": true, "expand": "md", "children": [ "", "", "" ], "tag": "nav", "scrolling": false }

Resources (screenshots, code snippets etc.)

Only thing i do add this line in dependency of package.json ["mdbreact": "./mdbreact-4.17.0.tgz"]

and then direct import in my project

import React, { Component } from "react";

import { MDBNavbar, MDBNavbarBrand, MDBNavbarNav, MDBNavItem, MDBNavLink, MDBNavbarToggler, MDBCollapse, MDBDropdown, MDBDropdownToggle, MDBDropdownMenu, MDBDropdownItem, MDBIcon } from "mdbreact";

import { BrowserRouter as Router } from 'react-router-dom';

and then use it but in DOM element only

only class name is loaded but respected class styling is not loaded

so Result DOM element is basic HTML without styling


get4sachin free commented 4 years ago

ERROR IS "You may need an appropriate loader to handle this file type."

When i iimport css file in to app.js


Piotr Glejzer staff commented 4 years ago

did you change anything in your webpack file?



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.17.0
  • Device: Dell intel XEON
  • Browser: Firefox
  • OS: Windows
  • Provided sample code: No
  • Provided link: No