diff --git a/packages/demo/src/content/components/alert.mdx b/packages/demo/src/content/components/alert.mdx index ba9cb19..9ff08a6 100644 --- a/packages/demo/src/content/components/alert.mdx +++ b/packages/demo/src/content/components/alert.mdx @@ -116,6 +116,6 @@ The `success`, `warning`, and `danger` variants apply a default icon automatical | Name | Description | Type | Default | Required | | ------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------- | --------------- | -------- | | `title` | The alert heading, rendered as an `

` | `string` | — | ✅ | -| `description` | The alert body text, rendered as a `

` | `string` | — | ✅ | +| `description` | The alert body text, rendered as a `

` | `string`, `ReactNode` | — | ❌ | | `variant` | The visual style of the alert | `primary`, `neutral`, `success`, `warning`, `danger` | `primary` | ❌ | | `icon` | Overrides the variant's default icon. Lucide name, element, or `null` to hide | `string`, `ReactElement`, `null` | Variant default | ❌ | diff --git a/packages/ui/package.json b/packages/ui/package.json index c119f8e..93b1b25 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -2,7 +2,7 @@ "name": "@eqtylab/equality", "description": "EQTYLab's component and token-based design system", "homepage": "https://equality.eqtylab.io/", - "version": "2.0.0", + "version": "2.0.1", "license": "Apache-2.0", "keywords": [ "component library", diff --git a/packages/ui/src/components/alert/alert.tsx b/packages/ui/src/components/alert/alert.tsx index 3095586..00d1c92 100644 --- a/packages/ui/src/components/alert/alert.tsx +++ b/packages/ui/src/components/alert/alert.tsx @@ -30,7 +30,7 @@ const defaultVariantIcons: Record = { interface AlertProps extends React.HTMLAttributes, VariantProps { title: string; - description: string; + description?: string | React.ReactNode; icon?: React.ReactElement | string | null; } @@ -61,7 +61,7 @@ const Alert = React.forwardRef( /> ) : null}

{title}

-

{description}

+ {description ?

{description}

: null} ); }