UNPKG

1.9 kBTypeScriptView Raw
1import { HTMLAttributes, ElementType, Component, ComponentType } from "react";
2import CommonProps from '../util';
3
4export interface ShellProps extends HTMLAttributes<HTMLElement>, CommonProps {
5 /**
6 * 设备类型,针对不同的设备类型组件做出对应的响应式变化
7 */
8 device?: 'tablet' | 'desktop' | 'phone';
9 type?: 'light' | 'dark' | 'brand';
10 fixedHeader?: boolean;
11}
12
13export interface ShellCommonProps extends HTMLAttributes<HTMLElement>, CommonProps {
14
15}
16
17export interface ShellNavigationProps extends ShellCommonProps {
18 collapse?: boolean;
19 direction?: 'hoz' | 'ver';
20 align?: 'left' | 'right' | 'center';
21 fixed?: boolean;
22 trigger?: any;
23 onCollapseChange?: (collapse?: boolean) => void;
24}
25
26export interface ShellLocalNavigationProps extends ShellCommonProps {
27 collapse?: boolean;
28 onCollapseChange?: (collapse?: boolean) => void;
29}
30
31export interface ShellToolDockProps extends ShellCommonProps {
32 collapse?: boolean;
33 fixed?: boolean;
34 onCollapseChange?: (collapse?: boolean) => void;
35}
36
37export interface ShellAncillaryProps extends ShellCommonProps {
38 collapse?: boolean;
39 onCollapseChange?: (collapse?: boolean) => void;
40}
41
42export default class Shell extends Component<ShellProps, any> {
43 static Branding: ComponentType<ShellCommonProps>;
44 static Action: ComponentType<ShellCommonProps>;
45 static MultiTask: ComponentType<ShellCommonProps>;
46 static AppBar: ComponentType<ShellCommonProps>;
47 static Content: ComponentType<ShellCommonProps>;
48 static Footer: ComponentType<ShellCommonProps>;
49 static ToolDockItem: ComponentType<ShellCommonProps>;
50
51 static Navigation: ComponentType<ShellNavigationProps>;
52 static LocalNavigation: ComponentType<ShellLocalNavigationProps>;
53 static Ancillary: ComponentType<ShellAncillaryProps>;
54 static ToolDock: ComponentType<ShellToolDockProps>;
55}