feat: RequestTabs

This commit is contained in:
Anoop M D
2021-12-04 02:03:46 +05:30
parent a863f9730d
commit f6732e66a0
9 changed files with 176 additions and 16 deletions

View File

@ -14,6 +14,7 @@
"@grafnode/www": "^0.0.1",
"@tabler/icons": "^1.46.0",
"@tippyjs/react": "^4.2.6",
"classnames": "^2.3.1",
"immer": "^9.0.7",
"nanoid": "^3.1.30",
"next": "12.0.4",
@ -2415,6 +2416,11 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/@next/react-dev-overlay/node_modules/classnames": {
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
},
"node_modules/@next/react-refresh-utils": {
"version": "12.0.4",
"resolved": "https://registry.npmjs.org/@next/react-refresh-utils/-/react-refresh-utils-12.0.4.tgz",
@ -3467,9 +3473,9 @@
}
},
"node_modules/classnames": {
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
},
"node_modules/color": {
"version": "4.1.0",
@ -9725,6 +9731,11 @@
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"classnames": {
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
}
}
},
@ -10443,9 +10454,9 @@
}
},
"classnames": {
"version": "2.2.6",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
},
"color": {
"version": "4.1.0",

View File

@ -26,6 +26,7 @@
"@grafnode/www": "^0.0.1",
"@tabler/icons": "^1.46.0",
"@tippyjs/react": "^4.2.6",
"classnames": "^2.3.1",
"immer": "^9.0.7",
"nanoid": "^3.1.30",
"next": "12.0.4",

View File

@ -1,5 +1,9 @@
import React from 'react';
import {Navbar, Sidebar} from '@grafnode/components';
import {
Navbar,
RequestTabs,
Sidebar
} from '@grafnode/components';
import actions from 'providers/Store/actions';
import { useStore } from 'providers/Store';
import StyledWrapper from './StyledWrapper';
@ -9,6 +13,7 @@ export default function Main() {
const {
collections,
requestTabs,
activeRequestTabId
} = state;
@ -25,7 +30,12 @@ export default function Main() {
activeRequestTabId={activeRequestTabId}
/>
<section className='mt-4 flex flex-grow flex-col'>
Request & Response Tabs
<RequestTabs
requestTabs={requestTabs}
actions={actions}
dispatch={dispatch}
activeRequestTabId={activeRequestTabId}
/>
</section>
</StyledWrapper>
</div>