The SVG markup as a string to be downloaded.
Optionalfilename: string = 'label.svg'The filename for the downloaded file.
This function does not return a value.
import EnergyLabel, { download } from 'energy-label'
const element = document.getElementById('energy-label')
const label = new EnergyLabel('arrow', { efficiencyRating: 'A' })
const svgString = label.toString()
download(svgString)
// Or with a custom filename:
download(svgString, 'my-energy-label.svg')
Downloads an SVG string as a file to the user's device.