Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint free
- Loading branch information
Showing
38 changed files
with
3,245 additions
and
2,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 30 additions & 18 deletions
48
src/common/components/custom-parameters/custom-parameters.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
import React, { useState } from 'react'; | ||
import { Table, Input, Button, Space } from 'antd'; | ||
//@ts-ignore | ||
import Highlighter from 'react-highlight-words'; | ||
import React from 'react'; | ||
import { Table, Input } from 'antd'; | ||
import 'react-highlight-words'; | ||
|
||
export const CustomParameters = ({data, onValueChange}) => { | ||
const columns = [ | ||
export const CustomParameters = ({ data, onValueChange }) => { | ||
const columns = [ | ||
{ | ||
title: 'Key', | ||
dataIndex: 'key', | ||
key: 'key', | ||
width: '50%', | ||
title: 'Key', | ||
dataIndex: 'key', | ||
key: 'key', | ||
width: '50%', | ||
}, | ||
{ | ||
title: 'Value', | ||
dataIndex: 'value', | ||
key: 'value', | ||
width: '50%', | ||
} | ||
]; | ||
return <Table columns={columns} dataSource={Object.keys(data).map(key => ({key,value:<Input value={data[key]} onChange={(e) => onValueChange(key, e.target.value)}/>}))} />; | ||
} | ||
title: 'Value', | ||
dataIndex: 'value', | ||
key: 'value', | ||
width: '50%', | ||
}, | ||
]; | ||
return ( | ||
<Table | ||
columns={columns} | ||
dataSource={Object.keys(data).map(key => ({ | ||
key, | ||
value: ( | ||
<Input | ||
value={data[key]} | ||
onChange={e => onValueChange(key, e.target.value)} | ||
/> | ||
), | ||
}))} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { CustomParameters } from "./custom-parameters"; | ||
export { CustomParameters } from './custom-parameters'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { PathParameters } from "./path-parameters"; | ||
export { PathParameters } from './path-parameters'; |
44 changes: 28 additions & 16 deletions
44
src/common/components/path-parameters/path-parameters.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
import React from 'react'; | ||
import { Table, Input } from 'antd'; | ||
//@ts-ignore | ||
import Highlighter from 'react-highlight-words'; | ||
import 'react-highlight-words'; | ||
|
||
export const PathParameters = ({data, onValueChange}) => { | ||
const columns = [ | ||
export const PathParameters = ({ data, onValueChange }) => { | ||
const columns = [ | ||
{ | ||
title: 'Key', | ||
dataIndex: 'key', | ||
key: 'key', | ||
width: '50%', | ||
title: 'Key', | ||
dataIndex: 'key', | ||
key: 'key', | ||
width: '50%', | ||
}, | ||
{ | ||
title: 'Value', | ||
dataIndex: 'value', | ||
key: 'value', | ||
width: '50%', | ||
} | ||
]; | ||
return <Table columns={columns} dataSource={Object.keys(data).map(key => ({key,value:<Input value={data[key]} onChange={(e) => onValueChange(key, e.target.value)}/>}))} />; | ||
} | ||
title: 'Value', | ||
dataIndex: 'value', | ||
key: 'value', | ||
width: '50%', | ||
}, | ||
]; | ||
return ( | ||
<Table | ||
columns={columns} | ||
dataSource={Object.keys(data).map(key => ({ | ||
key, | ||
value: ( | ||
<Input | ||
value={data[key]} | ||
onChange={e => onValueChange(key, e.target.value)} | ||
/> | ||
), | ||
}))} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { ResponseValues } from "./response-values"; | ||
export { ResponseValues } from './response-values'; |
Oops, something went wrong.