* change(ui): projects revamtp (wip) * change(ui): projects revamtp (wip) * change(ui): projects revamp - project form * change(ui): projects revamp - capture rate tab * change(ui): projects revamp - gdpr * change(ui): projects revamp - reset state * change(ui): projects revamp - progress avatar of samplerate, scroll etc., * change(ui): projects revamp - sync projects in list * change(ui): projects revamp - project menu improvements
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import { Tabs, TabsProps } from 'antd';
|
|
import { useStore } from '@/mstore';
|
|
import { observer } from 'mobx-react-lite';
|
|
|
|
const customTabBar: TabsProps['renderTabBar'] = (props, DefaultTabBar) => (
|
|
<DefaultTabBar {...props} className="!mb-0" />
|
|
);
|
|
|
|
function ProjectTabs() {
|
|
const { projectsStore } = useStore();
|
|
const activeTab = projectsStore.config.tab;
|
|
|
|
const tabItems = [
|
|
{ key: 'installation', label: 'Installation', content: <div>Installation Content</div> },
|
|
{ key: 'captureRate', label: 'Capture Rate', content: <div>Capture Rate Content</div> },
|
|
{ key: 'metadata', label: 'Metadata', content: <div>Metadata Content</div> },
|
|
{ key: 'tags', label: 'Tags', content: <div>Tags Content</div> },
|
|
// { key: 'groupKeys', label: 'Group Keys', content: <div>Group Keys Content</div> }
|
|
];
|
|
|
|
const onTabChange = (key: string) => {
|
|
projectsStore.setConfigTab(key);
|
|
};
|
|
|
|
return (
|
|
<Tabs
|
|
type="line"
|
|
defaultActiveKey={tabItems[0].key}
|
|
activeKey={activeTab}
|
|
style={{ borderBottom: 'none' }}
|
|
onChange={onTabChange}
|
|
renderTabBar={customTabBar}
|
|
items={tabItems.map((tab) => ({
|
|
key: tab.key,
|
|
label: tab.label
|
|
}))}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default observer(ProjectTabs);
|