Skip to content

Commit bd0bae2

Browse files
authored
fix: typescript issue in banner when customizing buttons (#2970)
1 parent e509bf8 commit bd0bae2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/Banner.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ type Props = $RemoveChildren<typeof Surface> & {
3333
*
3434
* To customize button you can pass other props that button component takes.
3535
*/
36-
actions: Array<{
37-
label: string;
38-
onPress: () => void;
39-
}>;
36+
actions: Array<
37+
{
38+
label: string;
39+
} & Omit<React.ComponentProps<typeof Button>, 'children'>
40+
>;
4041
/**
4142
* Style of banner's inner content.
4243
* Use this prop to apply custom width for wide layouts.

0 commit comments

Comments
 (0)