From 4f4eb76bd4d4125b1bd8855fb399c396f2915b35 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Thu, 24 Jul 2025 07:25:20 +0200 Subject: [PATCH] [Icons] Document `icon_sets` configuration --- src/Icons/CHANGELOG.md | 3 ++- src/Icons/doc/index.rst | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Icons/CHANGELOG.md b/src/Icons/CHANGELOG.md index 52b4fb26f97..0c856de7799 100644 --- a/src/Icons/CHANGELOG.md +++ b/src/Icons/CHANGELOG.md @@ -14,10 +14,11 @@ We recommend you to **lock** your icons **before** upgrading to UX Icons 2.24. W - Add `aliases` configuration option to define icon alternative names. - Add support for `int` and `float` attribute values in ``. +- Add support for Icon sets, configurable with `icon_sets` option. ## 2.19.0 -- Add `ignore_not_found` option to silence error during rendering if the +- Add `ignore_not_found` option to silence error during rendering if the icon is not found. ## 2.17.0 diff --git a/src/Icons/doc/index.rst b/src/Icons/doc/index.rst index 3c9e42bdd02..c8bea5a3e17 100644 --- a/src/Icons/doc/index.rst +++ b/src/Icons/doc/index.rst @@ -628,6 +628,21 @@ Full Configuration # Whether to ignore errors when an icon is not found ignore_not_found: false + # Icon sets configuration, array of prefix => icon set configuration + icon_sets: + # Icon set for "flags", can be used like this: ux_icon('flags:fr') + flags: + It can either be mapped to a local directory... + path: '%kernel.project_dir%/assets/images/flags' + ... or to an existing icon set identifier + alias: 'lucide' + + # Override the default attributes (default_icon_attributes) for this icon set + icon_attributes: + class: 'flag' # Replace the default class + stroke: 'none' # Add a new attribute + fill: false # Use "false" to remove a default attribute + Learn more ----------