Skip to content

Commit fb4303f

Browse files
authored
docs(Page): add jsDoc comments (#736)
1 parent 880a8ab commit fb4303f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

packages/main/src/components/Page/index.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,52 @@ import { CommonProps } from '../../interfaces/CommonProps';
1414
import styles from './Page.jss';
1515

1616
export interface PagePropTypes extends CommonProps {
17+
/**
18+
* The title text appearing in the page header bar.
19+
*/
1720
title?: string;
21+
/**
22+
* It is used to set the background color of a page.
23+
*/
1824
backgroundDesign?: PageBackgroundDesign;
25+
/**
26+
* The (optional) custom header of this page. Use this prop only when a custom header
27+
* is constructed where the default header consisting of title text + nav button is not sufficient.
28+
*/
1929
customHeader?: ReactNode;
30+
/**
31+
* The (optional) custom footer of this page.
32+
*/
2033
customFooter?: ReactNode;
34+
/**
35+
* A back button will be rendered on the left area of header bar if this property is set to true.
36+
*/
2137
showBackButton?: boolean;
38+
/**
39+
* Whether this page shall have a footer.
40+
*/
2241
showFooter?: boolean;
42+
/**
43+
* Whether this page shall have a header.
44+
*/
2345
showHeader?: boolean;
46+
/**
47+
* This event is fired when Nav Button is pressed.
48+
*/
2449
onNavButtonPress?: (e: CustomEvent<{}>) => void;
50+
/**
51+
* The content area of the page.
52+
*/
2553
children: ReactElement<any> | ReactElement<any>[] | ReactNode;
2654
}
2755

2856
const useStyles = createComponentStyles(styles, {
2957
name: 'Page'
3058
});
3159

60+
/**
61+
* A layout component that holds one whole screen of an application.
62+
*/
3263
const Page: FC<PagePropTypes> = forwardRef((props: PagePropTypes, ref: Ref<HTMLDivElement>) => {
3364
const {
3465
children,

0 commit comments

Comments
 (0)