@@ -8,7 +8,6 @@ import Editor from "@monaco-editor/react";
88import { Alert , Button , Dropdown , Empty , Spin , message } from "antd" ;
99import _ from "lodash" ;
1010import React from "react" ;
11- import { apiResponse } from "../../../mocks/openApiResponse" ;
1211import { EditorLanguages } from "../../../types/EditorLanguages" ;
1312import I18N from "../../../utils/I18N" ;
1413import { getEditorMenuItems , parseXml } from "../../utils" ;
@@ -35,7 +34,7 @@ export const TryAPI: React.FC<TryAPIProps> = (props) => {
3534 const { openAPIResponses, isApiResultLoading, version, apiMeta, product, mode } = APIPageContext . useContainer ( ) ;
3635 const doc = `${ product } ::${ version } ::${ apiMeta . name } ` ;
3736 const [ tab , setTab ] = React . useState ( TAB_PANES [ 0 ] . value ) ;
38- const apiResult = openAPIResponses ?. [ doc ] || apiResponse ;
37+ const apiResult = openAPIResponses ?. [ doc ] ;
3938
4039 const noShowMonacoEditor = [ "byte" ] ;
4140
@@ -158,22 +157,22 @@ export const TryAPI: React.FC<TryAPIProps> = (props) => {
158157 closable
159158 />
160159 { apiResult ?. result || isApiResultLoading ? (
161- < div className = "api-result" >
160+ < div className = "api-result w-full " >
162161 { isApiResultLoading ? (
163162 < Spin >
164163 < span > </ span >
165164 </ Spin >
166165 ) : null }
167166
168167 < div className = "api-res-header" >
169- < div className = "title" > { I18N . main . explorer . overview } </ div >
168+ < div className = "title mb-4 text-gray-900 text-sm font-medium " > { I18N . main . explorer . overview } </ div >
170169 { /* {apiResult?.result || props.isApiResultLoading ? ( */ }
171- < div className = "res-info" >
172- < div className = "item" >
173- < div className = "debug-res" >
170+ < div className = "res-info mb-4 flex " >
171+ < div className = "item mr-6 mx-1 inline-block " >
172+ < div className = "debug-res flex " >
174173 < div
175174 className = { `codicon codicon-${
176- String ( statusCode ) . startsWith ( "2" ) ? "pass-filled success" : "error error-red"
175+ String ( statusCode ) . startsWith ( "2" ) ? "pass-filled success text-green-600 " : "error error-red text-red-700 "
177176 } `}
178177 > </ div >
179178 < div className = "value" >
@@ -182,21 +181,21 @@ export const TryAPI: React.FC<TryAPIProps> = (props) => {
182181 </ div >
183182 </ div >
184183 { apiResult && statusCode ? (
185- < div className = "item" >
184+ < div className = "item mr-6 mx-1 " >
186185 { /* {httpStatusMessageMap[statusCode] || statusCode} */ }
187- < span className = "label" > { I18N . main . explorer . statusCode } </ span >
186+ < span className = "label font-medium mr-1 text-gray-500 " > { I18N . main . explorer . statusCode } </ span >
188187 < span
189- className = { `value result-status ${
190- String ( statusCode ) . startsWith ( "2" ) ? "success" : "error error-red"
188+ className = { `value result-status font-medium ${
189+ String ( statusCode ) . startsWith ( "2" ) ? "text-green-600 success" : "error error-red text-red-700 "
191190 } `}
192191 >
193192 { statusCode }
194193 </ span >
195194 </ div >
196195 ) : null }
197196 { apiResult ? (
198- < div className = "item" >
199- < span className = "label" > { I18N . main . explorer . time } </ span >
197+ < div className = "item mr-6 mx-1 " >
198+ < span className = "label font-medium mr-1 text-gray-500 " > { I18N . main . explorer . time } </ span >
200199 < span className = "value" > { apiResult . cost } ms</ span >
201200 </ div >
202201 ) : null }
0 commit comments