Repository navigation
Conversation
| Q | A | -------------- | --- | Bug fix? | no | New feature? | yes | Deprecations? | no | Documentation? | yes | Issues | Part of symfony#4247 | License | MIT This adds the Badge recipe to the `daisyui-5` kit. The Badge component renders a `<span>` and maps the daisyUI classes to props: ```twig <twig:Badge color="default | neutral | primary | secondary | accent | info | success | warning | error" variant="default | outline | dash | soft | ghost" size="xs | sm | md | lg | xl" > Badge </twig:Badge> ``` The props follow the Button recipe: `color` for the color, `variant` for the style and `size` for the size. The daisyUI examples use both `<span>` and `<div>`. The component always renders a `<span>`, which is valid inside a button or a heading, as in the "In A Button" and "In A Text" examples. The README has every example of https://daisyui.com/components/badge/, plus an RTL example. The icons are inline SVG copied from the daisyUI docs, as in the Button recipe, so the recipe needs no icon package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the Badge recipe to the
daisyui-5kit.The Badge component renders a
<span>and maps the daisyUI classes to props:The props follow the Button recipe:
colorfor the color,variantfor the style andsizefor the size. The daisyUI examples use both<span>and<div>. The component always renders a<span>, which is valid inside a button or a heading, as in the "In A Button" and "In A Text" examples.The README has every example of https://daisyui.com/components/badge/, plus an RTL example. The icons are inline SVG copied from the daisyUI docs, as in the Button recipe, so the recipe needs no icon package.
Screenshots