|
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 |
|
17 | | -import React, { useEffect, useState } from 'react' |
18 | | -import ReactSelect from 'react-select' |
| 17 | +import { useEffect, useState } from 'react' |
19 | 18 | import { fetchChartTemplateVersions } from './Common.service' |
20 | 19 | import { ChartVersionAndTypeSelectorProps, DeploymentChartVersionType } from './Types' |
21 | | -import { customStyles, getFilteredChartVersions, showError } from './Helper' |
| 20 | +import { getFilteredChartVersions, showError } from './Helper' |
| 21 | +import { SelectPicker, SelectPickerVariantType } from '@Shared/Components' |
22 | 22 |
|
23 | 23 | // @TODO: Generalize this component to be used in CodeEditor as Chart selector toolbar |
24 | 24 | // when the Code Editor is moved to the fe-common-lib |
@@ -71,20 +71,23 @@ const ChartVersionAndTypeSelector = ({ setSelectedChartRefId }: ChartVersionAndT |
71 | 71 | <div className="flex"> |
72 | 72 | <div className="chart-type-options flex" data-testid="chart-type-options"> |
73 | 73 | <span className="cn-7 mr-4">Chart Type</span> |
74 | | - <ReactSelect |
| 74 | + <SelectPicker |
| 75 | + inputId='chart-type-select' |
| 76 | + label='Chart Type' |
75 | 77 | value={selectedChartType ?? chartTypeOptions[0]} |
76 | 78 | options={chartTypeOptions} |
77 | 79 | onChange={handleChartTypeChange} |
78 | | - styles={customStyles} |
| 80 | + variant={SelectPickerVariantType.BORDER_LESS} |
79 | 81 | /> |
80 | 82 | </div> |
81 | 83 | <div className="chart-version-options flex" data-testid="chart-version-options"> |
82 | | - <span className="cn-7 mr-4">Chart Version</span> |
83 | | - <ReactSelect |
| 84 | + <span className="cn-7 mr-4">Chart Version</span> |
| 85 | + <SelectPicker |
| 86 | + inputId='chart-version-select' |
84 | 87 | value={selectedChartVersion ?? chartVersionOptions[0]} |
85 | 88 | options={chartVersionOptions} |
86 | 89 | onChange={handleChartVersionChange} |
87 | | - styles={customStyles} |
| 90 | + variant={SelectPickerVariantType.BORDER_LESS} |
88 | 91 | /> |
89 | 92 | </div> |
90 | 93 | </div> |
|
0 commit comments