diff --git a/docs/docs/components/badge.md b/docs/docs/components/badge.md index 5f6001210..dd37b8558 100644 --- a/docs/docs/components/badge.md +++ b/docs/docs/components/badge.md @@ -22,6 +22,43 @@ Set the `variant` attribute to change the badge's variant. Danger ``` +### Appearance + +Use the `appearance` attribute to change the badge's visual appearance. + +```html {.example} +
+ Filled + Both + Tinted + Outlined +
+
+ Filled + Both + Tinted + Outlined +
+
+ Filled + Both + Tinted + Outlined +
+
+ Filled + Both + Tinted + Outlined +
+
+ Filled + Both + Tinted + Outlined +
+``` + ### Pill Badges Use the `pill` attribute to give badges rounded edges. diff --git a/src/components/badge/badge.ts b/src/components/badge/badge.ts index 16abe27a6..10c028e41 100644 --- a/src/components/badge/badge.ts +++ b/src/components/badge/badge.ts @@ -2,6 +2,7 @@ import { html } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; import WebAwesomeElement from '../../internal/webawesome-element.js'; +import appearanceStyles from '../../styles/utilities/appearance.css'; import variantStyles from '../../styles/utilities/variants.css'; import styles from './badge.css'; @@ -24,7 +25,7 @@ import styles from './badge.css'; */ @customElement('wa-badge') export default class WaBadge extends WebAwesomeElement { - static shadowStyle = [variantStyles, styles]; + static shadowStyle = [variantStyles, appearanceStyles, styles]; /** The badge's theme variant. */ @property({ reflect: true }) variant: 'brand' | 'success' | 'neutral' | 'warning' | 'danger' = 'brand';