Skip to content

Commit caef906

Browse files
Merge pull request #150 from input-output-hk/feat/LW-12762-prevent-closing-send-flow
feat: allow for hiding close button in Drawer
2 parents c4a3608 + ee83a8b commit caef906

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/design-system/side-drawer/side-drawer-content-header.component.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { Separator } from './side-drawer-separator.component';
1515
interface Props {
1616
text: string;
1717
onBackClick?: () => void;
18-
onCloseClick: () => void;
18+
onCloseClick?: () => void;
1919
}
2020

2121
export const Header = ({
@@ -46,12 +46,14 @@ export const Header = ({
4646
</Text.Body.Large>
4747
</Flex>
4848
<Flex w="$40">
49-
<Close>
50-
<NavigationButtons.Close
51-
onClick={onCloseClick}
52-
data-testid="drawer-header-close-button"
53-
/>
54-
</Close>
49+
{onCloseClick && (
50+
<Close>
51+
<NavigationButtons.Close
52+
onClick={onCloseClick}
53+
data-testid="drawer-header-close-button"
54+
/>
55+
</Close>
56+
)}
5557
</Flex>
5658
</Flex>
5759
<Box mb="$32">

0 commit comments

Comments
 (0)