@crystaltech/hsms-shared-ui 0.0.2-alpha-0.0.6 → 0.0.2-alpha-0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -886,6 +886,44 @@ const data: DataStructure = [
886
886
  ];
887
887
  ```
888
888
 
889
+ usage of the MultiDynamicTable
890
+
891
+ ```ts
892
+ import { useState } from "react";
893
+ import MultiDynamicTable from "./MultiDynamicTable/MultiDynamicTable";
894
+ import { dynamicTableData } from "./MultiDynamicTable/dynamicTableData";
895
+
896
+ const Tables = () => {
897
+ const [page, setPage] = useState(0);
898
+ const [rowsPerPage, setRowsPerPage] = useState(10);
899
+
900
+ const handleChangePage = (_event: unknown, newPage: number) => {
901
+ setPage(newPage);
902
+ };
903
+
904
+ const handleChangeRowsPerPage = (
905
+ event: React.ChangeEvent<HTMLInputElement>
906
+ ) => {
907
+ setRowsPerPage(parseInt(event.target.value, 10));
908
+ setPage(0);
909
+ };
910
+
911
+ return (
912
+ <>
913
+ <MultiDynamicTable
914
+ tableData={dynamicTableData}
915
+ page={page}
916
+ rowsPerPage={rowsPerPage}
917
+ handleChangePage={handleChangePage}
918
+ handleChangeRowsPerPage={handleChangeRowsPerPage}
919
+ />
920
+ </>
921
+ );
922
+ };
923
+
924
+ export default Tables;
925
+ ```
926
+
889
927
  ### 13. `CustomTabs`
890
928
 
891
929
  ### 14. `CustomTabs`
@@ -0,0 +1,5 @@
1
+ import { IUserManage } from './layout/MainLayout';
2
+ declare const AccountInfoWithAvatar: ({ userManage }: {
3
+ userManage: IUserManage;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default AccountInfoWithAvatar;
@@ -1,9 +1,20 @@
1
1
  import { default as React } from 'react';
2
2
  import { IMenuConfig, ISettingsConfig } from '../dummyData';
3
+ interface IUser {
4
+ name: string;
5
+ email: string;
6
+ image: string;
7
+ }
8
+ export interface IUserManage {
9
+ user: IUser;
10
+ redirectUrl: string;
11
+ logoutHandler: () => void;
12
+ }
3
13
  export interface ILayoutConfig {
4
14
  navbar: {
5
15
  showHamburgerInMobile: boolean;
6
16
  themeToggler: boolean;
17
+ userManage?: IUserManage;
7
18
  };
8
19
  sideDrawer: {
9
20
  menuConfig: IMenuConfig[];