I'm trying to implement a dropdown list in HTML/CSS and more specifically in React. I've found a tutorial here showing something that could interest me : Link
The only problem is that when I include this code and modify it a little in my React project nothing appends... It seems to be a problem of bootstrap but I can't identify it.
Here is what happens :
Here is my code :
import React, { Component } from "react";
import "./VerticalDots.css";
export default class VerticalDots extends Component {
render() {
return (
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src={require("../imgs/3dots-vertical.png")} alt="NotFound"/>
</button>
<ul class="dropdown-menu">
<li>0123 4567 8912 3456</li>
<li>0123 4567 8912 3456</li>
<li>0123 4567 8912 3456</li>
</ul>
</div>
);
}
}
A little help would be much appreciated !
ulshould also havearia-labelledby="dropdownMenuButton"with the namedropdownMenuButtonthe same as the id of your button check it here