File tree Expand file tree Collapse file tree 1 file changed +26
-11
lines changed
extensions/ql-vscode/src/view/model-editor Expand file tree Collapse file tree 1 file changed +26
-11
lines changed Original file line number Diff line number Diff line change 11import { styled } from "styled-components" ;
2- import type { Method } from "../../model-editor/method" ;
32
43const Name = styled . span `
54 font-family: var(--vscode-editor-font-family);
65 word-break: break-all;
76` ;
87
9- const TypeMethodName = ( method : Method ) => {
10- if ( ! method . typeName ) {
11- return < > { method . methodName } </ > ;
8+ const TypeMethodName = ( {
9+ typeName,
10+ methodName,
11+ } : {
12+ typeName ?: string ;
13+ methodName ?: string ;
14+ } ) => {
15+ if ( ! typeName ) {
16+ return < > { methodName } </ > ;
1217 }
1318
14- if ( ! method . methodName ) {
15- return < > { method . typeName } </ > ;
19+ if ( ! methodName ) {
20+ return < > { typeName } </ > ;
1621 }
1722
1823 return (
1924 < >
20- { method . typeName } .{ method . methodName }
25+ { typeName } .{ methodName }
2126 </ >
2227 ) ;
2328} ;
2429
25- export const MethodName = ( method : Method ) : React . JSX . Element => {
30+ export const MethodName = ( {
31+ packageName,
32+ typeName,
33+ methodName,
34+ methodParameters,
35+ } : {
36+ packageName : string ;
37+ typeName ?: string ;
38+ methodName ?: string ;
39+ methodParameters ?: string ;
40+ } ) : React . JSX . Element => {
2641 return (
2742 < Name >
28- { method . packageName && < > { method . packageName } .</ > }
29- < TypeMethodName { ... method } />
30- { method . methodParameters }
43+ { packageName && < > { packageName } .</ > }
44+ < TypeMethodName typeName = { typeName } methodName = { methodName } />
45+ { methodParameters }
3146 </ Name >
3247 ) ;
3348} ;
You can’t perform that action at this time.
0 commit comments