Skip to content

Commit 915d92e

Browse files
committed
fixes
1 parent b44e1ec commit 915d92e

File tree

12 files changed

+96
-108
lines changed

12 files changed

+96
-108
lines changed

src/ui/components/forms/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export const EditField = (
180180
} & any,
181181
): JSX.Element => {
182182
return (
183-
<FlexBox.Column fullWidth style={{ height: '100px' }}>
183+
<FlexBox.Column fullWidth >
184184
<FlexBox alignItems="center" fullWidth style={{ position: 'relative' }}>
185185
<InputWithLabel
186186
name={props.name}
Lines changed: 9 additions & 5 deletions
Loading
Lines changed: 3 additions & 5 deletions
Loading

src/ui/layouts/NonEditableConfig/index.tsx

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const NonEditableConfig: React.FC<{ details: any }> = ({ details }) => {
2929
const getFormElement: any = (elementName: any, elementSchema: any) => {
3030
if (typeof elementSchema === 'string') {
3131
return (
32-
<Box marginVertical={'md'} style={{ width: '100%' }}>
32+
<Box marginTop='lg' style={{ width: '100%' }}>
3333
<EditField
3434
disabled
3535
onChangeText={() => console.log('')}
@@ -45,7 +45,7 @@ export const NonEditableConfig: React.FC<{ details: any }> = ({ details }) => {
4545
}
4646
if (typeof elementSchema === 'object') {
4747
return (
48-
<Box marginVertical={'xl'} style={{ width: '100%' }}>
48+
<Box marginTop='lg' style={{ width: '100%' }}>
4949
<Paragraph size="body" style={{ color: 'black' }}>
5050
<label htmlFor={elementName}>{titleCase(elementName)}</label>
5151
</Paragraph>
@@ -76,7 +76,7 @@ export const NonEditableConfig: React.FC<{ details: any }> = ({ details }) => {
7676
</FlexBox.Row>
7777
)}
7878
{Object.entries(elementSchema).map(([key, value]) => (
79-
<FlexBox.Row>
79+
<FlexBox.Row marginTop='lg'>
8080
<EditField
8181
disabled
8282
onChangeText={() => console.log('')}
@@ -106,7 +106,7 @@ export const NonEditableConfig: React.FC<{ details: any }> = ({ details }) => {
106106
}
107107
if (typeof elementSchema === 'boolean') {
108108
return (
109-
<Box marginVertical={'md'} style={{ width: '100%' }}>
109+
<Box marginTop='lg' style={{ width: '100%' }}>
110110
<ToggleField
111111
value={elementSchema}
112112
onHandleChange={() => {}}
@@ -145,7 +145,7 @@ export const NonEditableConfig: React.FC<{ details: any }> = ({ details }) => {
145145

146146
return (
147147
<FlexBox.Column marginTop="xl" fullWidth>
148-
<FlexBox.Row>
148+
<FlexBox.Row flexDirection='column'>
149149
<Container>
150150
<Box style={{ width: '80%' }}>
151151
<EditField
@@ -159,20 +159,15 @@ export const NonEditableConfig: React.FC<{ details: any }> = ({ details }) => {
159159
className={styles.field}
160160
/>
161161
</Box>
162-
{/* <FlexBox.Row justifyContent="space-between" style={{ width: '80%' }}>
163-
<Paragraph>Share Component with public</Paragraph>
164-
<label className={styles.switch}>
165-
<input type="checkbox" checked={details.is_shared} />
166-
<span className={`${styles.slider} ${styles.round}`}></span>
167-
</label>
168-
</FlexBox.Row> */}
169-
<ToggleField
170-
name='Share Component with public'
171-
value={details.is_shared}
172-
onHandleChange={() => {}}
173-
label='Share Component with public'
174-
disabled={true}
175-
/>
162+
<Box marginTop='lg'>
163+
<ToggleField
164+
name='Share Component with public'
165+
value={details.is_shared}
166+
onHandleChange={() => {}}
167+
label='Share Component with public'
168+
disabled={true}
169+
/>
170+
</Box>
176171
</Container>
177172
{/* <Container>
178173

src/ui/layouts/NonEditableRunConfig/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const NonEditableRunConfig: React.FC<{ runConfiguration: any }> = ({
1111
const getFormElement: any = (elementName: any, elementSchema: any) => {
1212
if (typeof elementSchema === 'string') {
1313
return (
14-
<Box marginVertical={'md'} style={{ width: '40%' }}>
14+
<Box marginTop={'lg'} style={{ width: '40%' }}>
1515
<EditField
1616
disabled
1717
// onKeyDown={(e: any) => onPressEnter(e, 'string', elementName)}
@@ -29,13 +29,13 @@ export const NonEditableRunConfig: React.FC<{ runConfiguration: any }> = ({
2929

3030
if (typeof elementSchema === 'object' && elementSchema !== null) {
3131
return (
32-
<Box style={{ width: '40%' }}>
32+
<Box marginTop='lg' style={{ width: '40%' }}>
3333
<Paragraph size="body" style={{ color: 'black' }}>
3434
<label htmlFor={elementName}>{titleCase(elementName)}</label>
3535
</Paragraph>
3636
<Box
3737
padding={'md'}
38-
marginVertical={'md'}
38+
// marginVertical={'md'}
3939
className={styles.JSONPretty}
4040
>
4141
<JSONPretty
@@ -50,7 +50,7 @@ export const NonEditableRunConfig: React.FC<{ runConfiguration: any }> = ({
5050

5151
if (typeof elementSchema === 'boolean' || elementSchema === null) {
5252
return (
53-
<Box marginVertical={'md'} style={{ width: '40%' }}>
53+
<Box marginTop={'lg'} style={{ width: '40%' }}>
5454
<Box>
5555
{/* {console.log(elementSchema, elementName, 'asdasdasda2222sdasd')}
5656
<FlexBox.Row justifyContent="space-between">

src/ui/layouts/common/FormElement/index.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
}
4646

4747
input:checked + .slider {
48-
background-color: $primaryColor;
48+
background-color: #CCCCCC;
4949
}
5050

5151
input:focus + .slider {
52-
box-shadow: 0 0 1px $primaryColor;
52+
box-shadow: 0 0 1px #CCCCCC;
5353
}
5454

5555
input:checked + .slider:before {

src/ui/layouts/common/FormElement/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ export function ToggleField(props: any) {
7373
onChange={onHandleChange}
7474
disabled={disabled}
7575
/>
76-
<span className={`${styles.sliderBlue} ${styles.round}`}></span>
76+
{disabled ? <span className={`${styles.slider} ${styles.round}`}></span> :
77+
<span className={`${styles.sliderBlue} ${styles.round}`}></span>}
78+
7779
</label>
7880
</FlexBox.Row>
7981
</FlexBox.Row>

src/ui/layouts/common/StackBox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const StackBox: React.FC<{
5555

5656
<Box style={{ marginTop: '8px' }}>
5757
<Paragraph className={styles.stackName}>
58-
{titleCase(stackName?.slice(0, 17))}
58+
{titleCase(stackName?.slice(0, 18))}
5959
</Paragraph>
6060
</Box>
6161

src/ui/layouts/stackComponents/StackDetail/Configuration/index.tsx

Lines changed: 55 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
232232
const getFormElement: any = (elementName: any, elementSchema: any) => {
233233
if (typeof elementSchema === 'string') {
234234
return (
235-
<Box marginVertical={'md'} style={{ width: '100%' }}>
235+
<Box marginTop='lg'>
236236
<EditField
237237
disabled
238238
onKeyDown={(e: any) => onPressEnter(e, 'string', elementName)}
@@ -242,14 +242,14 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
242242
defaultValue={elementSchema}
243243
placeholder=""
244244
hasError={false}
245-
className={styles.field}
245+
// className={styles.field}
246246
/>
247247
</Box>
248248
);
249249
}
250250
if (typeof elementSchema === 'object') {
251251
return (
252-
<Box marginVertical={'xl'} style={{ width: '100%' }}>
252+
<Box marginTop='lg' style={{ width: '100%' }}>
253253
<Paragraph size="body" style={{ color: 'black' }}>
254254
<label htmlFor={elementName}>{titleCase(elementName)}</label>
255255
</Paragraph>
@@ -309,7 +309,7 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
309309
)}
310310
{Object.entries(elementSchema).map(([key, value], index) => (
311311
<>
312-
<FlexBox.Row>
312+
<FlexBox.Row marginTop='lg'>
313313
<EditField
314314
disabled
315315
onKeyDown={(e: any) =>
@@ -370,45 +370,50 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
370370
<FlexBox.Row key={`${inputField}~${index}`}>
371371
{console.log(inputFields, 'inputFieldsinputFields')}
372372
{/* <div className="form-group col-sm-6"> */}
373-
<EditField
374-
onKeyDown={(e: any) =>
375-
onPressEnterForAddMore(
376-
e,
377-
'addMore',
378-
elementName,
379-
// index,
380-
)
381-
}
382-
onChangeText={(event: any) =>
383-
handleInputChange(index, event, elementName, 'key')
384-
}
385-
disabled
386-
label={'Key'}
387-
className={styles.field}
388-
value={inputField?.key}
389-
placeholder={''}
390-
/>
373+
<Box marginTop='lg'>
374+
<EditField
375+
onKeyDown={(e: any) =>
376+
onPressEnterForAddMore(
377+
e,
378+
'addMore',
379+
elementName,
380+
// index,
381+
)
382+
}
383+
onChangeText={(event: any) =>
384+
handleInputChange(index, event, elementName, 'key')
385+
}
386+
disabled
387+
label={'Key'}
388+
className={styles.field}
389+
value={inputField?.key}
390+
placeholder={''}
391+
/>
392+
</Box>
393+
391394
<div style={{ width: '10%' }}></div>
392395
{/* </div> */}
393396
{/* <div className="form-group col-sm-5"> */}
394-
<EditField
395-
onKeyDown={(e: any) =>
396-
onPressEnterForAddMore(
397-
e,
398-
'addMore',
399-
elementName,
400-
// index,
401-
)
402-
}
403-
disabled
404-
className={styles.field}
405-
onChangeText={(event: any) =>
406-
handleInputChange(index, event, elementName, 'value')
407-
}
408-
label={'Value'}
409-
value={inputField?.value}
410-
placeholder={''}
411-
/>
397+
<Box marginTop='lg'>
398+
<EditField
399+
onKeyDown={(e: any) =>
400+
onPressEnterForAddMore(
401+
e,
402+
'addMore',
403+
elementName,
404+
// index,
405+
)
406+
}
407+
disabled
408+
className={styles.field}
409+
onChangeText={(event: any) =>
410+
handleInputChange(index, event, elementName, 'value')
411+
}
412+
label={'Value'}
413+
value={inputField?.value}
414+
placeholder={''}
415+
/>
416+
</Box>
412417
{/* </div> */}
413418
{/* <div
414419
className="col-sx-2 "
@@ -448,7 +453,7 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
448453
}
449454
if (typeof elementSchema === 'boolean') {
450455
return (
451-
<Box marginVertical={'md'} style={{ width: '100%' }}>
456+
<Box marginTop={'lg'} style={{ width: '100%' }}>
452457
<Box>
453458
<ToggleField
454459
value={elementSchema}
@@ -492,53 +497,37 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
492497
}
493498
return (
494499
<FlexBox.Column marginTop="xl" fullWidth>
495-
<FlexBox.Row>
500+
<FlexBox.Row flexDirection='column' style={{ width: '40%' }}>
496501
<Container>
497-
<Box style={{ width: '79%' }}>
502+
<Box>
498503
<EditField
499504
disabled
500505
onKeyDown={(e: any) => onPressEnter(e, 'name')}
501506
onChangeText={(e: any) => onPressEnter(e, 'name')}
502507
label={'Component Name'}
503508
optional={false}
504509
defaultValue={stackComponent.name}
505-
// value={stackComponent.name}
506510
placeholder=""
507511
hasError={false}
508512
className={styles.field}
509513
/>
510514
</Box>
511515
</Container>
512516
<Container>
513-
<ToggleField
514-
value={stackComponent.isShared}
515-
onHandleChange={() => onChangeToggle(!stackComponent.isShared, 'share')}
516-
label='Share Component with public'
517-
disabled={true}
517+
<Box marginTop='lg'>
518+
<ToggleField
519+
value={stackComponent.isShared}
520+
onHandleChange={() => onChangeToggle(!stackComponent.isShared, 'share')}
521+
label='Share Component with public'
522+
disabled={true}
518523
/>
524+
</Box>
519525
</Container>
520526
</FlexBox.Row>
521527
<FlexBox.Row style={{ width: '40%' }}>
522528
<Container>
523-
{/* <Row>
524-
<Col xs={5}>
525-
526-
</Col>
527-
<Col xs={5} style={{ marginLeft: '100px' }}>
528-
<FlexBox.Row justifyContent="space-between">
529-
<Paragraph>Share Component with public</Paragraph>
530-
<label className={styles.switch}>
531-
<input type="checkbox" checked={stackComponent.isShared} />
532-
<span className={`${styles.slider} ${styles.round}`}></span>
533-
</label>
534-
</FlexBox.Row>
535-
</Col>
536-
</Row> */}
537-
538529
{Object.keys(mappedObject).map((key, ind) => (
539-
// <Col xs={6} key={ind}>
540530
<>{getFormElement(key, mappedObject[key])}</>
541-
// </Col>
542531
))}
543532
</Container>
544533
</FlexBox.Row>

src/ui/layouts/stacks/CreateStack/ListForAll/GetList/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const GetList: React.FC<Props> = ({
107107
);
108108
}}
109109
>
110-
<StackBox stackName="Create Component" stackDesc="" />
110+
<StackBox stackName="Register Component" stackDesc="" />
111111
</div>
112112
</Box>
113113
{list?.map((item: any) => {

0 commit comments

Comments
 (0)