Skip to content

Commit

Permalink
Merge pull request #2449 from axa-ch-webhub-cloud/fix-AXATopContentBa…
Browse files Browse the repository at this point in the history
…rProps-variant-declaration

Fix axa top content bar props declaration
  • Loading branch information
Pachj authored Jun 23, 2023
2 parents 04d7e0f + 48ecee2 commit 70e612c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/components/20-molecules/top-content-bar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.2.1
- Add missing values for variant type definition.
- Add missing type definition for onClose.

## 6.2.0

Update package scope, registry and repository URL. #2423
Expand Down
8 changes: 5 additions & 3 deletions src/components/20-molecules/top-content-bar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ There is also the possibility to add child elements.

### Variant

| Attribute | Details |
| ------------------- | ---------------------------------------------- |
| `variant="warning"` | Show a red top content bar as a warning banner |
| Attribute | Details |
| ------------------- | ---------------------------------------------- |
| `variant="warning"` | Show a red top content bar as a warning banner |
| `variant="success"` | Show a green top content bar as a success banner |
| `variant="attention"` | Show a yellow top content bar as a attention banner |

### ctatext

Expand Down
3 changes: 2 additions & 1 deletion src/components/20-molecules/top-content-bar/index.react.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

export type Variant = 'warning';
export type Variant = 'default' | 'warning' | 'success' | 'attention';

export interface AXATopContentBarProps {
variant?: Variant;
Expand All @@ -13,6 +13,7 @@ export interface AXATopContentBarProps {
className?: string;
children?: React.ReactNode;
onClick?: () => void;
onClose?: () => void;
}

declare function createAXATopContentBar(
Expand Down

0 comments on commit 70e612c

Please sign in to comment.