1
- import { Popover } from 'antd' ;
1
+ import { Popover , Tabs } from 'antd' ;
2
2
import { noop } from 'lodash' ;
3
3
import { useTheme } from 'styled-components' ;
4
4
import { ConfigMode , SupportedDataStores } from 'types/DataStore.types' ;
@@ -26,7 +26,7 @@ const DataStoreSelectionInput = ({onChange = noop, value = SupportedDataStores.J
26
26
const configuredDataStoreType = dataStoreConfig . defaultDataStore . type ;
27
27
28
28
return (
29
- < S . DataStoreListContainer >
29
+ < S . DataStoreListContainer tabPosition = "left" >
30
30
{ supportedDataStoreList . map ( dataStore => {
31
31
if ( dataStore === SupportedDataStores . Agent && ! getFlag ( Flag . IsAgentDataStoreEnabled ) ) {
32
32
return null ;
@@ -35,37 +35,43 @@ const DataStoreSelectionInput = ({onChange = noop, value = SupportedDataStores.J
35
35
const isSelected = value === dataStore ;
36
36
const isConfigured = configuredDataStoreType === dataStore && dataStoreConfig . mode === ConfigMode . READY ;
37
37
const isDisabled = isLocalModeEnabled && dataStore !== SupportedDataStores . Agent ;
38
+
38
39
return (
39
- < S . DataStoreItemContainer
40
- $isDisabled = { isDisabled }
41
- $isSelected = { isSelected }
40
+ < Tabs . TabPane
42
41
key = { dataStore }
43
- onClick = { ( ) => ( isDisabled ? noop ( ) : onChange ( dataStore ) ) }
44
- >
45
- < DataStoreIcon dataStoreType = { dataStore } color = { isSelected ? primary : text } width = "22" height = "22" />
46
-
47
- { isDisabled ? (
48
- < Popover
49
- content = {
50
- < div >
51
- In localMode only the Agent data store can be used. < br /> If you want to connect to a different
52
- data store < br /> please create a new environment
53
- </ div >
54
- }
55
- placement = "right"
42
+ tab = {
43
+ < S . DataStoreItemContainer
44
+ $isDisabled = { isDisabled }
45
+ $isSelected = { isSelected }
46
+ key = { dataStore }
47
+ onClick = { ( ) => ( isDisabled ? noop ( ) : onChange ( dataStore ) ) }
56
48
>
57
- < S . DataStoreName $isSelected = { isSelected } > { SupportedDataStoresToName [ dataStore ] } </ S . DataStoreName >
58
- </ Popover >
59
- ) : (
60
- < S . DataStoreName $isSelected = { isSelected } > { SupportedDataStoresToName [ dataStore ] } </ S . DataStoreName >
61
- ) }
49
+ < DataStoreIcon dataStoreType = { dataStore } color = { isSelected ? primary : text } width = "22" height = "22" />
50
+
51
+ { isDisabled ? (
52
+ < Popover
53
+ content = {
54
+ < div >
55
+ In localMode only the Agent data store can be used. < br /> If you want to connect to a different
56
+ data store < br /> please create a new environment
57
+ </ div >
58
+ }
59
+ placement = "right"
60
+ >
61
+ < S . DataStoreName $isSelected = { isSelected } > { SupportedDataStoresToName [ dataStore ] } </ S . DataStoreName >
62
+ </ Popover >
63
+ ) : (
64
+ < S . DataStoreName $isSelected = { isSelected } > { SupportedDataStoresToName [ dataStore ] } </ S . DataStoreName >
65
+ ) }
62
66
63
- { isConfigured && (
64
- < Popover content = "This data source is currently configured" placement = "right" >
65
- < S . InfoIcon />
66
- </ Popover >
67
- ) }
68
- </ S . DataStoreItemContainer >
67
+ { isConfigured && (
68
+ < Popover content = "This data source is currently configured" placement = "right" >
69
+ < S . InfoIcon />
70
+ </ Popover >
71
+ ) }
72
+ </ S . DataStoreItemContainer >
73
+ }
74
+ />
69
75
) ;
70
76
} ) }
71
77
</ S . DataStoreListContainer >
0 commit comments