import { Tabs, Typography } from 'antd'; import React, { useState } from 'react'; import styled from 'styled-components'; import { SearchablePage } from '../search/SearchablePage'; import { GroupList } from './group/GroupList'; import { UserList } from './user/UserList'; const PageContainer = styled.div` padding-top: 20px; `; const PageHeaderContainer = styled.div` && { padding-left: 24px; } `; const PageTitle = styled(Typography.Title)` && { margin-bottom: 12px; } `; const StyledTabs = styled(Tabs)` &&& .ant-tabs-nav { margin-bottom: 0; padding-left: 28px; } `; const Tab = styled(Tabs.TabPane)` font-size: 14px; line-height: 22px; `; const ListContainer = styled.div``; enum TabType { Users = 'Users', Groups = 'Groups', } export const ManageIdentitiesPage = () => { /** * Determines which view should be visible: users or groups list. */ const [selectedTab, setSelectedTab] = useState(TabType.Users); const onClickTab = (newTab: string) => { setSelectedTab(TabType[newTab]); }; return ( Manage Users & Groups View your DataHub users & groups. Take administrative actions. onClickTab(tab)}> {selectedTab === TabType.Users ? : } ); };