Refactor Banner Component to Use Icon Component

Created on 14 May 2025, 5 months ago

Problem/Motivation

The current banner component uses multiple inline {{ icon(...) }} functions in its Twig template to render icons. This embeds the icon rendering logic directly in the template, reducing reusability and complicating maintenance.

Proposed resolution

Refactor the banner component to use slots for each icon instance instead of embedding the {{ icon(...) }} function. This will allow users to pass in the icon component or other content dynamically via slots, enhancing flexibility and maintainability.

Remaining tasks

  • Update banner.component.yml: Add a slot definition for the icon.
  • Update banner.twig
  • Update the documentation to reflect the new slot-based approach.

Data model changes

No changes to the underlying data structure; this refactoring only affects the rendering logic.

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium raluelrusu Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024