+
setView(key)}
items={views}
- renderTabBar={customTabBar}
/>
- }>Docs
+ }>
+ Docs
+
@@ -90,14 +86,30 @@ function EventsList() {
sorter: (a, b) => a.monthVolume.localeCompare(b.monthVolume),
},
{
- title: '30 Day Query',
+ title: '30 Day Queries',
dataIndex: 'monthQuery',
key: 'monthQuery',
showSorterTooltip: { target: 'full-header' },
sorter: (a, b) => a.monthQuery.localeCompare(b.monthQuery),
},
- ]
- return
;
+ ];
+ const page = 1;
+ const total = 100;
+ const onPageChange = (page: number) => {};
+ const limit = 10;
+ return (
+
+ );
}
function UsersList({ toUser }: { toUser: (id: string) => void }) {
@@ -147,8 +159,8 @@ function UsersList({ toUser }: { toUser: (id: string) => void }) {
email: 'sad;jsadk',
},
updatedAt: Date.now(),
- })
- ]
+ }),
+ ];
const dropdownItems = [
{
@@ -211,8 +223,8 @@ function UsersList({ toUser }: { toUser: (id: string) => void }) {
const list = [];
const onAddFilter = () => console.log('add filter');
- const excludeFilterKeys = []
- const excludeCategory = []
+ const excludeFilterKeys = [];
+ const excludeCategory = [];
const shownCols = columns.map((col) => ({
...col,
@@ -229,8 +241,8 @@ function UsersList({ toUser }: { toUser: (id: string) => void }) {
setEditCols(false);
};
return (
-
-
+
+
{/* 1.23 --
Show by*/}
{/*
void }) {
icon={}
type="default"
size={'small'}
- className='btn-add-filter'
+ className="btn-add-filter"
>
Filters
@@ -269,36 +281,24 @@ function UsersList({ toUser }: { toUser: (id: string) => void }) {
/>
) : null}
- ({
- onClick: () => toUser(record.userId),
- })}
- pagination={false}
- rowClassName={'cursor-pointer'}
- dataSource={testUsers}
- columns={shownCols}
- />
-
-
-
- {'Showing '}
- {(page - 1) * limit + 1}
- {' to '}
-
- {(page - 1) * limit + list.length}
-
- {' of '}
- {numberWithCommas(total)}
- {' users.'}
-
-
({
+ onClick: () => toUser(record.userId),
+ })}
+ pagination={false}
+ rowClassName={'cursor-pointer'}
+ dataSource={testUsers}
+ columns={shownCols}
/>
+
);
}
diff --git a/frontend/app/components/shared/FullPagination.tsx b/frontend/app/components/shared/FullPagination.tsx
new file mode 100644
index 000000000..cb3da1478
--- /dev/null
+++ b/frontend/app/components/shared/FullPagination.tsx
@@ -0,0 +1,42 @@
+import React from 'react';
+import { Pagination } from 'UI';
+import { numberWithCommas } from 'App/utils';
+
+function FullPagination({
+ page,
+ limit,
+ total,
+ listLen,
+ onPageChange,
+ entity,
+}: {
+ page: number;
+ limit: number;
+ total: number;
+ listLen: number;
+ onPageChange: (page: number) => void;
+ entity?: string;
+}) {
+ return (
+
+
+ {'Showing '}
+ {(page - 1) * limit + 1}
+ {' to '}
+ {(page - 1) * limit + listLen}
+ {' of '}
+ {numberWithCommas(total)}
+ {entity ? ` ${entity}.` : '.'}
+
+
+
+ );
+}
+
+export default FullPagination;
diff --git a/frontend/app/components/shared/Tabs.tsx b/frontend/app/components/shared/Tabs.tsx
new file mode 100644
index 000000000..fb4602a06
--- /dev/null
+++ b/frontend/app/components/shared/Tabs.tsx
@@ -0,0 +1,35 @@
+import React from 'react';
+import { Tabs, TabsProps } from 'antd';
+
+const customTabBar: TabsProps['renderTabBar'] = (props, DefaultTabBar) => (
+
+);
+
+function CustomizedTabs({
+ items,
+ onChange,
+ activeKey,
+}: {
+ items: { key: string; label: React.ReactNode }[];
+ onChange: (key: string) => void;
+ activeKey: string;
+}) {
+ const customItems = items.map((i) => ({
+ ...i,
+ content: placeholder
,
+ }));
+
+ return (
+
+ );
+}
+
+export default CustomizedTabs;