Topic: Does mdb hover work?

Gaini free asked 3 years ago


I copied the code :

Strong overlay

But it did no work for me. Were there some new updates?


Bartłomiej Malanowski staff commented 3 years ago

As I can see, everything is working fine. What kind of issues are you facing?


Gaini free commented 3 years ago

Code:

import { MDBMask, MDBView} from "mdbreact";

< MDBView hover zoom>

< img src="https://mdbootstrap.com/img/Others/documentation/img%20(131)-mini.jpg" className="img-fluid" alt="" />

< MDBMask className="flex-center" overlay="red-slight"> < p className="white-text"> Super light overlay

< /MDBMask>< /MDBView>

But it is not working as supposed. It just shows the image and the Super light overlay text under the image and no hover effect. Bootstrap version - 4.3.1 MDB version - 4.12.0


Jakub Mandra staff answered 3 years ago


Hi @Gaini

Could you show the code of your index.js and App.js?

Have you fulfilled all the steps from the installation guide? https://mdbootstrap.com/docs/react/getting-started/quick-start/

Best,

Jakub


Gaini free commented 3 years ago

Hi!

Yes, I did not import some libraries in index.js. Now everything is working. Thank you!


Jakub Mandra staff commented 3 years ago

I'm glad that helped.

If there is anything else I could do for you do not hesitate to ask.



Here's my code copied from the docs and it's working as it should:

<MDBView hover>
  <img
    src="https://mdbootstrap.com/img/Others/documentation/forest-sm-mini.jpg"
    className="img-fluid"
    alt=""
  />
  <MDBMask className="flex-center" overlay="red-strong">
    <p className="white-text">Strong overlay</p>
  </MDBMask>
</MDBView>

Gaini free commented 3 years ago

Same code is not working for me :( Could the problem be in the warning "Could not find a declaration file for module 'mdbreact'. '/Users/.../node_modules/mdbreact/dist/mdbreact.js' implicitly has an 'any' type. Try npm install @types/mdbreact if it exists or add a new declaration (.d.ts) file containing declare module 'mdbreact';ts(7016)"

npm install @types/mdbreact gave 404 error.

Do you know how to solve the issue? I believe that it may cause that mdbreact is not working as expected.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.11.1
  • Device: MacBook Air
  • Browser: Safari
  • OS: Mac OS
  • Provided sample code: No
  • Provided link: No
Tags