Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,10 @@ bottomSheet = (payload: SheetUI) => Promise<SheetResponse>
being opened (for example, user accidental double tap), it will throw an Error
with code `423` (Locked)

> **Note**
> Sheets of type LIST -> SINGLE_SELECTION only have tags available since APP
> version 26.3

### fetchPhoneNumbers

<kbd>App version >=13.10</kbd>
Expand Down
10 changes: 7 additions & 3 deletions src/__tests__/bottom-sheet-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ test('bottomSheet', (done) => {
url: 'https://example.com/icon.png',
urlDark: 'https://example.com/dark-icon.png',
},
},
} as const,
{
id: 'item-1',
title: 'item 1 title',
description: 'item 1 description',
},
} as const,
{
id: 'item-2',
tag: {
type: 'warning',
text: 'item 2 tag',
},
title: 'item 2 title',
description: 'item 2 description',
},
} as const,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS complained without this

],
},
];
Expand Down
11 changes: 11 additions & 0 deletions src/bottom-sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ import {postMessageToNativeApp, type SheetResponse} from './post-message';

export type SheetRowItem = Readonly<{
id: string;
tag?: {
type?:
| 'promo'
| 'info'
| 'active'
| 'inactive'
| 'success'
| 'warning'
| 'error'; // "promo" by default
text: string;
};
title?: string;
description?: string;
icon?: Readonly<{
Expand Down