From 9141e21a029c7e5fb32884de78f0c86bb8a655b8 Mon Sep 17 00:00:00 2001 From: brabli <67018167+brabli@users.noreply.github.com> Date: Wed, 26 Feb 2025 10:59:42 +0000 Subject: [PATCH] Update readme --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18a058d..fbf086f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Create badges from objects or as standalone elements.
-# Badgeable interface +# Creating badges with `BadgeableInterface` Any object that you would like to be able to be turned into a badge must implement `BadgeableInterface`. @@ -39,7 +39,7 @@ public function getBadgeColour(): Badge } ``` -You then specify the object using the `obj` prop when rendering the badge: +You then specify the object using the `:obj` prop when rendering the badge: ```twig {# job.html.twig #} @@ -74,7 +74,16 @@ obj="{{ job.kind }}" `outline` - A boolean attribute that changes the style of the badge to an outline. -`class` - Extra classes you want to add to the badge element. These will override the base classes in case of conflicts. +`class` - Extra classes you want to add to the badge element. These are merged with the badge base classes taking priority in case of conflicts. + +`label` - Badge label text. Content inside the content block will be prioritised over the label attribute if present. +```php +{# Both of these render the same markup. #} + + + +Warning! +```