From 068a7df53265e71193ef583145c69d17b3f76535 Mon Sep 17 00:00:00 2001 From: Nandan Devadula <47176249+devadula-nandan@users.noreply.github.com> Date: Sat, 7 Sep 2024 18:44:39 +0530 Subject: [PATCH] fix(Tearsheet): changed actions prop to optional (#5984) --- packages/ibm-products/src/components/Tearsheet/Tearsheet.tsx | 2 +- .../ibm-products/src/components/Tearsheet/TearsheetNarrow.tsx | 2 +- .../ibm-products/src/components/Tearsheet/TearsheetShell.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ibm-products/src/components/Tearsheet/Tearsheet.tsx b/packages/ibm-products/src/components/Tearsheet/Tearsheet.tsx index 1edf86e6f9..9db6a1864d 100644 --- a/packages/ibm-products/src/components/Tearsheet/Tearsheet.tsx +++ b/packages/ibm-products/src/components/Tearsheet/Tearsheet.tsx @@ -59,7 +59,7 @@ export interface TearsheetProps extends PropsWithChildren { * * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api */ - actions: ButtonProps<'button'>[]; + actions?: ButtonProps<'button'>[]; /** * The aria-label for the tearsheet, which is optional. diff --git a/packages/ibm-products/src/components/Tearsheet/TearsheetNarrow.tsx b/packages/ibm-products/src/components/Tearsheet/TearsheetNarrow.tsx index 2b92185cfa..d1e32827a9 100644 --- a/packages/ibm-products/src/components/Tearsheet/TearsheetNarrow.tsx +++ b/packages/ibm-products/src/components/Tearsheet/TearsheetNarrow.tsx @@ -38,7 +38,7 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren { * * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api */ - actions?: ButtonProps[]; + actions?: ButtonProps<'button'>[]; /** * The aria-label for the tearsheet, which is optional. diff --git a/packages/ibm-products/src/components/Tearsheet/TearsheetShell.tsx b/packages/ibm-products/src/components/Tearsheet/TearsheetShell.tsx index 9cc6c0b9a0..f918edc06c 100644 --- a/packages/ibm-products/src/components/Tearsheet/TearsheetShell.tsx +++ b/packages/ibm-products/src/components/Tearsheet/TearsheetShell.tsx @@ -49,7 +49,7 @@ const componentName = 'TearsheetShell'; const maxDepth = 3; interface TearsheetShellProps extends PropsWithChildren { - actions?: ButtonProps[]; + actions?: ButtonProps<'button'>[]; ariaLabel?: string;