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! +```