-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) O3-2533: Add a snackbar notification (#809)
* Add snack bar to the style guide * Add documentation * more clean ups * update the documentation * update the documentation * renaming snackbar * update docs * Fix failing tests * add snackbar animation * update docs * update docs with timeoutInMs * Improve peerDependencies * Fixup * More fixups --------- Co-authored-by: Ian <[email protected]>
- Loading branch information
1 parent
3aaf41e
commit 6766209
Showing
20 changed files
with
737 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
103 changes: 103 additions & 0 deletions
103
packages/framework/esm-framework/docs/interfaces/ShowSnackBarEvent.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
[@openmrs/esm-framework](../API.md) / ShowSnackbarEvent | ||
|
||
# Interface: ShowSnackbarEvent | ||
|
||
## Table of contents | ||
|
||
### Properties | ||
|
||
- [actionButtonLabel](ShowSnackbarEvent.md#actionbuttonlabel) | ||
- [isLowContrast](ShowSnackbarEvent.md#islowcontrast) | ||
- [kind](ShowSnackbarEvent.md#kind) | ||
- [progressActionLabel](ShowSnackbarEvent.md#progressactionlabel) | ||
- [subtitle](ShowSnackbarEvent.md#subtitle) | ||
- [timeoutInMs](ShowSnackbarEvent.md#timeoutinms) | ||
- [title](ShowSnackbarEvent.md#title) | ||
|
||
### Methods | ||
|
||
- [onActionButtonClick](ShowSnackbarEvent.md#onactionbuttonclick) | ||
|
||
## Properties | ||
|
||
### actionButtonLabel | ||
|
||
• `Optional` **actionButtonLabel**: `any` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:109](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L109) | ||
|
||
___ | ||
|
||
### isLowContrast | ||
|
||
• `Optional` **isLowContrast**: `boolean` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:112](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L112) | ||
|
||
___ | ||
|
||
### kind | ||
|
||
• `Optional` **kind**: ``"error"`` \| ``"info"`` \| ``"info-square"`` \| ``"success"`` \| ``"warning"`` \| ``"warning-alt"`` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:101](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L101) | ||
|
||
___ | ||
|
||
### progressActionLabel | ||
|
||
• `Optional` **progressActionLabel**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:111](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L111) | ||
|
||
___ | ||
|
||
### subtitle | ||
|
||
• `Optional` **subtitle**: `any` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:100](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L100) | ||
|
||
___ | ||
|
||
### timeoutInMs | ||
|
||
• `Optional` **timeoutInMs**: `number` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:113](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L113) | ||
|
||
___ | ||
|
||
### title | ||
|
||
• **title**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:108](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L108) | ||
|
||
## Methods | ||
|
||
### onActionButtonClick | ||
|
||
▸ `Optional` **onActionButtonClick**(): `void` | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-globals/src/events.ts:110](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L110) |
109 changes: 109 additions & 0 deletions
109
packages/framework/esm-framework/docs/interfaces/SnackBarDescriptor.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
[@openmrs/esm-framework](../API.md) / SnackbarDescriptor | ||
|
||
# Interface: SnackbarDescriptor | ||
|
||
## Hierarchy | ||
|
||
- **`SnackbarDescriptor`** | ||
|
||
↳ [`SnackbarMeta`](SnackbarMeta.md) | ||
|
||
## Table of contents | ||
|
||
### UI Properties | ||
|
||
- [actionButtonLabel](SnackbarDescriptor.md#actionbuttonlabel) | ||
- [isLowContrast](SnackbarDescriptor.md#islowcontrast) | ||
- [kind](SnackbarDescriptor.md#kind) | ||
- [progressActionLabel](SnackbarDescriptor.md#progressactionlabel) | ||
- [subtitle](SnackbarDescriptor.md#subtitle) | ||
- [timeoutInMs](SnackbarDescriptor.md#timeoutinms) | ||
- [title](SnackbarDescriptor.md#title) | ||
|
||
### UI Methods | ||
|
||
- [onActionButtonClick](SnackbarDescriptor.md#onactionbuttonclick) | ||
|
||
## UI Properties | ||
|
||
### actionButtonLabel | ||
|
||
• `Optional` **actionButtonLabel**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L14) | ||
|
||
___ | ||
|
||
### isLowContrast | ||
|
||
• `Optional` **isLowContrast**: `boolean` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L15) | ||
|
||
___ | ||
|
||
### kind | ||
|
||
• `Optional` **kind**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L16) | ||
|
||
___ | ||
|
||
### progressActionLabel | ||
|
||
• `Optional` **progressActionLabel**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L18) | ||
|
||
___ | ||
|
||
### subtitle | ||
|
||
• `Optional` **subtitle**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:19](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L19) | ||
|
||
___ | ||
|
||
### timeoutInMs | ||
|
||
• `Optional` **timeoutInMs**: `number` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:20](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L20) | ||
|
||
___ | ||
|
||
### title | ||
|
||
• **title**: `string` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:21](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L21) | ||
|
||
## UI Methods | ||
|
||
### onActionButtonClick | ||
|
||
▸ `Optional` **onActionButtonClick**(): `void` | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/snackbars/snackbar.component.tsx#L17) |
Oops, something went wrong.