Can anyone tell me how to add telephone number to the react bootstrap buttons, when clicking should call that number.
I have used div tags and link to make it look like a button. what I want to do is to make the button work the in the same way as anchor tag
code :
<div className='phone-no'>
<Link className='link-phone-no' to='tel:+12-345-678-89089'>
+12-345-678-89089
</Link>
</div>
2
Answers
This method can make the button acts as a link component with clicking can go to a contact no we entered. The first set of button code is for mui v5 and second set of code is for react-bootstrap
import these components first:
import {BrowserRouter} from "react-router-dom"; --- index.js file before calling App component add BrowserRouter component
As I can see that
import {Button} from 'bootstrap_path';
And then use it having path binded with an onclick event listener that will call the function.You may use useref hook to get the desired values with it.