Skip to content

Commit 3fd6c16

Browse files
committed
apply code review
1 parent 9f74091 commit 3fd6c16

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/snaps-sdk/src/jsx/components/Footer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ import type { ButtonElement } from './form';
99
*/
1010
export type FooterProps = {
1111
children: ButtonElement | [ButtonElement, ButtonElement];
12-
requireScroll?: boolean;
12+
requireScroll?: boolean | undefined;
1313
};
1414

1515
const TYPE = 'Footer';
1616

1717
/**
1818
* A footer component, which is used to create a footer with buttons.
1919
*
20-
* Note: The `requireScroll` prop also activates an arrow that allows you to scroll to bottom.
21-
*
2220
* @param props - The props of the component.
2321
* @param props.requireScroll - Controls whether footer buttons require all content to be viewed before becoming active.
22+
* The prop also activates an arrow that allows you to scroll to bottom.
2423
* @param props.children - The single or multiple buttons in the footer.
2524
* @returns A footer element.
2625
* @example

packages/snaps-sdk/src/jsx/validation.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ describe('FooterStruct', () => {
653653
<Footer>
654654
<Button name="cancel">Cancel {true && 'foo'}</Button>
655655
</Footer>,
656+
<Footer requireScroll>
657+
<Button name="accept">Accept</Button>
658+
</Footer>,
656659
])('validates a footer element', (value) => {
657660
expect(is(value, FooterStruct)).toBe(true);
658661
});

0 commit comments

Comments
 (0)