@@ -10,17 +10,18 @@ import { VSCodeTag } from "@vscode/webview-ui-toolkit/react";
10
10
import { ReviewInEditorButton } from "./ReviewInEditorButton" ;
11
11
12
12
const Container = styled . div `
13
- padding: 0.3rem ;
13
+ padding-top : 0.5rem ;
14
14
margin-bottom: 1rem;
15
15
width: 100%;
16
16
` ;
17
17
18
18
const Title = styled . div `
19
- padding-bottom: 0.3rem ;
20
- font-size: 0.7rem ;
19
+ padding-bottom: 0.5rem ;
20
+ font-size: 0.9rem ;
21
21
text-transform: uppercase;
22
22
display: flex;
23
23
justify-content: space-between;
24
+ align-items: center;
24
25
` ;
25
26
26
27
const DependencyContainer = styled . div `
@@ -34,8 +35,23 @@ const DependencyContainer = styled.div`
34
35
padding: 0.5rem;
35
36
word-wrap: break-word;
36
37
word-break: break-all;
38
+ margin-bottom: 0.8rem;
39
+ ` ;
40
+
41
+ const StyledMethodModelingInputs = styled ( MethodModelingInputs ) `
42
+ padding-bottom: 0.5rem;
37
43
` ;
38
44
45
+ const StyledVSCodeTag = styled ( VSCodeTag ) < { visible : boolean } > `
46
+ visibility: ${ ( props ) => ( props . visible ? "visible" : "hidden" ) } ;
47
+ ` ;
48
+
49
+ const UnsavedTag = ( { modelingStatus } : { modelingStatus : ModelingStatus } ) => (
50
+ < StyledVSCodeTag visible = { modelingStatus === "unsaved" } >
51
+ Unsaved
52
+ </ StyledVSCodeTag >
53
+ ) ;
54
+
39
55
export type MethodModelingProps = {
40
56
modelingStatus : ModelingStatus ;
41
57
method : Method ;
@@ -54,13 +70,13 @@ export const MethodModeling = ({
54
70
< Title >
55
71
{ method . packageName }
56
72
{ method . libraryVersion && < > @{ method . libraryVersion } </ > }
57
- { modelingStatus === "unsaved" ? < VSCodeTag > Unsaved </ VSCodeTag > : null }
73
+ < UnsavedTag modelingStatus = { modelingStatus } />
58
74
</ Title >
59
75
< DependencyContainer >
60
76
< ModelingStatusIndicator status = { modelingStatus } />
61
77
< MethodName { ...method } />
62
78
</ DependencyContainer >
63
- < MethodModelingInputs
79
+ < StyledMethodModelingInputs
64
80
method = { method }
65
81
modeledMethod = { modeledMethod }
66
82
onChange = { onChange }
0 commit comments