A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
// Anywhere.tsx
<Button
onPress={async () => {
const result = await SheetManager.show<SheetProps, MyType>('MyActionSheet');
if (result /* result is properly annotaded with MyType */) {
console.log('result: ', result.name);
}
}}
/>,
Am I doing something wrong?
BTW, in the sheetmanager.d.td, we have:
hide<ReturnPayload extends any>(id: string, options?: {
/**
* Return some data to the caller on closing the Sheet.
*/
payload?: unknown;
/**
* Provide `context` of the `SheetProvider` to hide the action sheet.
*/
context?: string;
}): Promise<ReturnPayload>;
Hello!
First of all, congratulations, really nice job!
But I have a question: how do I properly annotate the .hide return payload, to match the .show type?
For instance:
Am I doing something wrong?
BTW, in the
sheetmanager.d.td
, we have:Can`t we change
to
?
So we could annotate .hide return payload.
Or is there another way?
Thanks in advance