Skip to content

Commit 564cca1

Browse files
committed
minor #2938 [Icons] Document icon_sets configuration (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Icons] Document `icon_sets` configuration | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | yes <!-- required for new features --> | Issues | Fix #2182 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Related to #2156 Commits ------- 4f4eb76 [Icons] Document `icon_sets` configuration
2 parents b51130b + 4f4eb76 commit 564cca1

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/Icons/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ We recommend you to **lock** your icons **before** upgrading to UX Icons 2.24. W
1414

1515
- Add `aliases` configuration option to define icon alternative names.
1616
- Add support for `int` and `float` attribute values in `<twig:ux:icon />`.
17+
- Add support for Icon sets, configurable with `icon_sets` option.
1718

1819
## 2.19.0
1920

20-
- Add `ignore_not_found` option to silence error during rendering if the
21+
- Add `ignore_not_found` option to silence error during rendering if the
2122
icon is not found.
2223

2324
## 2.17.0

src/Icons/doc/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,21 @@ Full Configuration
628628
# Whether to ignore errors when an icon is not found
629629
ignore_not_found: false
630630
631+
# Icon sets configuration, array of prefix => icon set configuration
632+
icon_sets:
633+
# Icon set for "flags", can be used like this: ux_icon('flags:fr')
634+
flags:
635+
It can either be mapped to a local directory...
636+
path: '%kernel.project_dir%/assets/images/flags'
637+
... or to an existing icon set identifier
638+
alias: 'lucide'
639+
640+
# Override the default attributes (default_icon_attributes) for this icon set
641+
icon_attributes:
642+
class: 'flag' # Replace the default class
643+
stroke: 'none' # Add a new attribute
644+
fill: false # Use "false" to remove a default attribute
645+
631646
Learn more
632647
----------
633648

0 commit comments

Comments
 (0)