@@ -10,17 +10,18 @@ import { VSCodeTag } from "@vscode/webview-ui-toolkit/react";
1010import { ReviewInEditorButton } from "./ReviewInEditorButton" ;
1111
1212const Container = styled . div `
13- padding: 0.3rem ;
13+ padding-top : 0.5rem ;
1414 margin-bottom: 1rem;
1515 width: 100%;
1616` ;
1717
1818const Title = styled . div `
19- padding-bottom: 0.3rem ;
20- font-size: 0.7rem ;
19+ padding-bottom: 0.5rem ;
20+ font-size: 0.9rem ;
2121 text-transform: uppercase;
2222 display: flex;
2323 justify-content: space-between;
24+ align-items: center;
2425` ;
2526
2627const DependencyContainer = styled . div `
@@ -34,8 +35,23 @@ const DependencyContainer = styled.div`
3435 padding: 0.5rem;
3536 word-wrap: break-word;
3637 word-break: break-all;
38+ margin-bottom: 0.8rem;
39+ ` ;
40+
41+ const StyledMethodModelingInputs = styled ( MethodModelingInputs ) `
42+ padding-bottom: 0.5rem;
3743` ;
3844
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+
3955export type MethodModelingProps = {
4056 modelingStatus : ModelingStatus ;
4157 method : Method ;
@@ -54,13 +70,13 @@ export const MethodModeling = ({
5470 < Title >
5571 { method . packageName }
5672 { method . libraryVersion && < > @{ method . libraryVersion } </ > }
57- { modelingStatus === "unsaved" ? < VSCodeTag > Unsaved </ VSCodeTag > : null }
73+ < UnsavedTag modelingStatus = { modelingStatus } />
5874 </ Title >
5975 < DependencyContainer >
6076 < ModelingStatusIndicator status = { modelingStatus } />
6177 < MethodName { ...method } />
6278 </ DependencyContainer >
63- < MethodModelingInputs
79+ < StyledMethodModelingInputs
6480 method = { method }
6581 modeledMethod = { modeledMethod }
6682 onChange = { onChange }
0 commit comments