From b1fc83092aba5a84f0f94259b1eb6a94a3683675 Mon Sep 17 00:00:00 2001 From: Dhruv Parmar <83108871+dhruvjsx@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:56:20 +0530 Subject: [PATCH] Minor:Restyled button group (#20714) * restyled button group * updated border radius * fixed button group hover|| modified all other button group * fixed comments * removed segmented values * made constant --- .../APIEndpointSchema/APIEndpointSchema.tsx | 31 +++++++------ .../Execution/Execution.component.tsx | 11 +++-- .../PipelineTaskTab/PipelineTaskTab.tsx | 10 ++--- .../Topic/TopicSchema/TopicSchema.tsx | 36 +++++++-------- .../common/ListView/ListView.component.tsx | 27 ++++++----- .../ui/src/styles/components/radio.less | 45 ++++++++++++++++++- 6 files changed, 103 insertions(+), 57 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/APIEndpoint/APIEndpointSchema/APIEndpointSchema.tsx b/openmetadata-ui/src/main/resources/ui/src/components/APIEndpoint/APIEndpointSchema/APIEndpointSchema.tsx index 51a8fdacadd..08b8b4adb02 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/APIEndpoint/APIEndpointSchema/APIEndpointSchema.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/APIEndpoint/APIEndpointSchema/APIEndpointSchema.tsx @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Col, Radio, RadioChangeEvent, Row, Tooltip, Typography } from 'antd'; +import { Col, Row, Segmented, Tooltip, Typography } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import classNames from 'classnames'; import { cloneDeep, groupBy, isEmpty, isUndefined, uniqBy } from 'lodash'; @@ -90,6 +90,16 @@ const APIEndpointSchema: FC = ({ onUpdate: onApiEndpointUpdate, } = useGenericContext(); + const viewTypeOptions = [ + { + label: t('label.request'), + value: SchemaViewType.REQUEST_SCHEMA, + }, + { + label: t('label.response'), + value: SchemaViewType.RESPONSE_SCHEMA, + }, + ]; const { requestSchemaAllRowKeys, responseSchemaAllRowKeys, @@ -182,10 +192,6 @@ const APIEndpointSchema: FC = ({ return activeSchemaDiff?.schemaFields ?? []; }, [activeSchema, apiEndpointDetails]); - const handleViewChange = (e: RadioChangeEvent) => { - setViewType(e.target.value); - }; - const handleExpandedRowsChange = (keys: readonly Key[]) => { setExpandedRowKeys(keys as string[]); }; @@ -405,14 +411,13 @@ const APIEndpointSchema: FC = ({ }} extraTableFilters={
- - - {t('label.request')} - - - {t('label.response')} - - + setViewType(value as SchemaViewType)} + /> + { - setView(e.target.value)} + onChange={(value) => setView(value as PIPELINE_EXECUTION_TABS)} /> +