I know how to download a file when clicking a button using html
<a href="./abcf32x.pdf" download="How-to-download-file.pdf">
<button>Download File</button>
</a>
But using Material-UI component how can I do this
I have the following component
<div>
<Button
variant="contained"
color="#ffa726"
size="large"
startIcon={<GetAppIcon />}
>
Download Sample Method File
</Button>
</div>
Now I want to download a file whose url is http://localhost:8000/static/sample_method.py
I don't want to open the link in browser and then do save as, rather it should get downloaded directly.