File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
packages/main/src/components/Page Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,52 @@ import { CommonProps } from '../../interfaces/CommonProps';
14
14
import styles from './Page.jss' ;
15
15
16
16
export interface PagePropTypes extends CommonProps {
17
+ /**
18
+ * The title text appearing in the page header bar.
19
+ */
17
20
title ?: string ;
21
+ /**
22
+ * It is used to set the background color of a page.
23
+ */
18
24
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
+ */
19
29
customHeader ?: ReactNode ;
30
+ /**
31
+ * The (optional) custom footer of this page.
32
+ */
20
33
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
+ */
21
37
showBackButton ?: boolean ;
38
+ /**
39
+ * Whether this page shall have a footer.
40
+ */
22
41
showFooter ?: boolean ;
42
+ /**
43
+ * Whether this page shall have a header.
44
+ */
23
45
showHeader ?: boolean ;
46
+ /**
47
+ * This event is fired when Nav Button is pressed.
48
+ */
24
49
onNavButtonPress ?: ( e : CustomEvent < { } > ) => void ;
50
+ /**
51
+ * The content area of the page.
52
+ */
25
53
children : ReactElement < any > | ReactElement < any > [ ] | ReactNode ;
26
54
}
27
55
28
56
const useStyles = createComponentStyles ( styles , {
29
57
name : 'Page'
30
58
} ) ;
31
59
60
+ /**
61
+ * A layout component that holds one whole screen of an application.
62
+ */
32
63
const Page : FC < PagePropTypes > = forwardRef ( ( props : PagePropTypes , ref : Ref < HTMLDivElement > ) => {
33
64
const {
34
65
children,
You can’t perform that action at this time.
0 commit comments