Skip to content

Commit

Permalink
Update the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hadijahkyampeire committed Nov 22, 2023
1 parent 99a9cc0 commit 69bc425
Show file tree
Hide file tree
Showing 4 changed files with 391 additions and 4 deletions.
68 changes: 64 additions & 4 deletions packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,13 @@
- [isDesktop](API.md#isdesktop)
- [setLeftNav](API.md#setleftnav)
- [showActionableNotification](API.md#showactionablenotification)
- [showActionableToast](API.md#showactionabletoast)
- [showModal](API.md#showmodal)
- [showNotification](API.md#shownotification)
- [showSnackbar](API.md#showsnackbar)
- [showToast](API.md#showtoast)
- [subscribeActionableNotificationShown](API.md#subscribeactionablenotificationshown)
- [subscribeActionableToastShown](API.md#subscribeactionabletoastshown)
- [subscribeNotificationShown](API.md#subscribenotificationshown)
- [subscribeSnackbarShown](API.md#subscribesnackbarshown)
- [subscribeToastShown](API.md#subscribetoastshown)
Expand Down Expand Up @@ -645,6 +647,16 @@ ___

___

### ActionableToastType

Ƭ **ActionableToastType**: ``"error"`` \| ``"info"`` \| ``"info-square"`` \| ``"success"`` \| ``"warning"`` \| ``"warning-alt"``

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:25](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L25)

___

### InlineNotificationType

Ƭ **InlineNotificationType**: ``"error"`` \| ``"info"`` \| ``"info-square"`` \| ``"success"`` \| ``"warning"`` \| ``"warning-alt"``
Expand Down Expand Up @@ -4295,6 +4307,28 @@ Displays an actionable notification in the UI.

___

### showActionableToast

**showActionableToast**(`actionableToast`): `void`

Displays a snack bar notification in the UI.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `actionableToast` | [`ActionableToastDescriptor`](interfaces/ActionableToastDescriptor.md) | The description of the snack bar to display. |

#### Returns

`void`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/index.tsx:35](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/index.tsx#L35)

___

### showModal

**showModal**(`extensionId`, `props?`, `onClose?`): () => `void`
Expand Down Expand Up @@ -4415,7 +4449,33 @@ ___

#### Defined in

[packages/framework/esm-globals/src/events.ts:149](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L149)
[packages/framework/esm-globals/src/events.ts:173](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L173)

___

### subscribeActionableToastShown

**subscribeActionableToastShown**(`cb`): () => `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `cb` | (`data`: [`ShowActionableToastEvent`](interfaces/ShowActionableToastEvent.md)) => `void` |

#### Returns

`fn`

▸ (): `void`

##### Returns

`void`

#### Defined in

[packages/framework/esm-globals/src/events.ts:197](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L197)

___

Expand All @@ -4441,7 +4501,7 @@ ___

#### Defined in

[packages/framework/esm-globals/src/events.ts:140](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L140)
[packages/framework/esm-globals/src/events.ts:164](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L164)

___

Expand All @@ -4467,7 +4527,7 @@ ___

#### Defined in

[packages/framework/esm-globals/src/events.ts:166](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L166)
[packages/framework/esm-globals/src/events.ts:190](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L190)

___

Expand All @@ -4493,7 +4553,7 @@ ___

#### Defined in

[packages/framework/esm-globals/src/events.ts:159](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L159)
[packages/framework/esm-globals/src/events.ts:183](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/events.ts#L183)

___

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[@openmrs/esm-framework](../API.md) / ActionableToastDescriptor

# Interface: ActionableToastDescriptor

## Hierarchy

- **`ActionableToastDescriptor`**

[`ActionableToastMeta`](ActionableToastMeta.md)

## Table of contents

### UI Properties

- [actionButtonLabel](ActionableToastDescriptor.md#actionbuttonlabel)
- [isLowContrast](ActionableToastDescriptor.md#islowcontrast)
- [kind](ActionableToastDescriptor.md#kind)
- [progressActionLabel](ActionableToastDescriptor.md#progressactionlabel)
- [subtitle](ActionableToastDescriptor.md#subtitle)
- [title](ActionableToastDescriptor.md#title)

### UI Methods

- [onActionButtonClick](ActionableToastDescriptor.md#onactionbuttonclick)

## UI Properties

### actionButtonLabel

`Optional` **actionButtonLabel**: `string`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L12)

___

### isLowContrast

`Optional` **isLowContrast**: `boolean`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L13)

___

### kind

`Optional` **kind**: `string`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L14)

___

### progressActionLabel

`Optional` **progressActionLabel**: `string`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L16)

___

### subtitle

`Optional` **subtitle**: `string`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L17)

___

### title

**title**: `string`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L18)

## UI Methods

### onActionButtonClick

`Optional` **onActionButtonClick**(): `void`

#### Returns

`void`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L15)
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
[@openmrs/esm-framework](../API.md) / ActionableToastMeta

# Interface: ActionableToastMeta

## Hierarchy

- [`ActionableToastDescriptor`](ActionableToastDescriptor.md)

**`ActionableToastMeta`**

## Table of contents

### UI Properties

- [actionButtonLabel](ActionableToastMeta.md#actionbuttonlabel)
- [id](ActionableToastMeta.md#id)
- [isLowContrast](ActionableToastMeta.md#islowcontrast)
- [kind](ActionableToastMeta.md#kind)
- [progressActionLabel](ActionableToastMeta.md#progressactionlabel)
- [subtitle](ActionableToastMeta.md#subtitle)
- [title](ActionableToastMeta.md#title)

### UI Methods

- [onActionButtonClick](ActionableToastMeta.md#onactionbuttonclick)

## UI Properties

### actionButtonLabel

`Optional` **actionButtonLabel**: `string`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[actionButtonLabel](ActionableToastDescriptor.md#actionbuttonlabel)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:12](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L12)

___

### id

**id**: `number`

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:22](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L22)

___

### isLowContrast

`Optional` **isLowContrast**: `boolean`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[isLowContrast](ActionableToastDescriptor.md#islowcontrast)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:13](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L13)

___

### kind

`Optional` **kind**: `string`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[kind](ActionableToastDescriptor.md#kind)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:14](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L14)

___

### progressActionLabel

`Optional` **progressActionLabel**: `string`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[progressActionLabel](ActionableToastDescriptor.md#progressactionlabel)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:16](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L16)

___

### subtitle

`Optional` **subtitle**: `string`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[subtitle](ActionableToastDescriptor.md#subtitle)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:17](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L17)

___

### title

**title**: `string`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[title](ActionableToastDescriptor.md#title)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:18](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L18)

## UI Methods

### onActionButtonClick

`Optional` **onActionButtonClick**(): `void`

#### Returns

`void`

#### Inherited from

[ActionableToastDescriptor](ActionableToastDescriptor.md).[onActionButtonClick](ActionableToastDescriptor.md#onactionbuttonclick)

#### Defined in

[packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx:15](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/actionable-toasts/actionable-toast.component.tsx#L15)
Loading

0 comments on commit 69bc425

Please sign in to comment.