Responsive Intro Section Page using Svelte, TS, and Tailwind

Solution retrospective
Instead of using svgs as images, with Svelte we can directly use them as Svelte Component Icon by changing .svg into .svelte and export them together with the links so that we can both use them for the Navbar Component.
import TodoIcon from '../icons/icon-todo.svelte' import CalendarIcon from '../icons/icon-calendar.svelte' import ReminderIcon from '../icons/icon-reminders.svelte' import PlanningIcon from '../icons/icon-planning.svelte' export function createLinks() { return [ { page: 'Features', links: [ { Icon: TodoIcon, page: 'Todo List', }, { Icon: CalendarIcon, page: 'Calendar', }, { Icon: ReminderIcon, page: 'Reminders', }, { Icon: PlanningIcon, page: 'Planning', }, ], }, ] }
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Fred Campo's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord