💾 Add Download Button for Haiku SVGs in Frontend
❓ What’s the Issue?
The frontend (frontend/src/App.jsx) currently lacks a button to download haiku SVGs, limiting users’ ability to save them locally.
🌍 Why Is This Important?
A Download SVG button will:
- 💡 Enhance HaikuReadme’s user experience by allowing users to save their custom haikus.
- 📤 Make it easier to share haikus in different formats, such as for social media or offline use.
🔧 Suggested Fix
- Add a “Download SVG” button in
frontend/src/App.jsx, placed near the theme preview.
- Fetch the SVG from the API (e.g.,
/api?theme=dracula) and trigger the download.
- Use JavaScript (e.g., Blob,
<a> element or your favourite approach) to save the SVG as theme-name.svg.
🧪 Additional Details
- Test with multiple themes like Nord and Catppuccin Mocha.
- Ensure the download button matches the existing UI styles (e.g., Dracula theme colors).
- The filename should include the selected theme, e.g.,
haiku-dracula.svg.
💾 Add Download Button for Haiku SVGs in Frontend
❓ What’s the Issue?
The frontend (
frontend/src/App.jsx) currently lacks a button to download haiku SVGs, limiting users’ ability to save them locally.🌍 Why Is This Important?
A Download SVG button will:
🔧 Suggested Fix
frontend/src/App.jsx, placed near the theme preview./api?theme=dracula) and trigger the download.<a>element or your favourite approach) to save the SVG astheme-name.svg.🧪 Additional Details
haiku-dracula.svg.